When I run this script it deletes the files that have bee uploaded in the remote server, not the files that were copied from local drive, which should be the correct ones to be deleted.
FTP Script
- # Retrieve current date and time
- # Substract two days (in seconds) from the current date,
- # assign the result to another variable
- $two_days_ago=$current_date_time-(2*24*60*60)
- # Request the remote file list
- # For each file in the current local directory
- # check if it is older than two days. If so upload it
- #EXEC("del".$local_file)
If you want to delete the local files you have to replace this:
with this:
FTP Script
- #EXEC("del".$local_file)
liked Script FTP? Try our other product Email Parser