Hi all,
i'm using the download and delete script to 'move' files from one site to another.
this works fine, but files that are already downloaded by another FTP program in the past, are still available at the source site.
is there a way to delete all the files at the 'source' site, that are already available at the 'destination' site ?
I now tried
but this isn't working as expected.
This is my complete script :
i'm using the download and delete script to 'move' files from one site to another.
this works fine, but files that are already downloaded by another FTP program in the past, are still available at the source site.
is there a way to delete all the files at the 'source' site, that are already available at the 'destination' site ?
I now tried
FTP Script
This is my complete script :
FTP Script
- # Connect to ftp.myhost.com as myuser
- # If OPENHOST failed stop the script
- #IF($result!="OK")
- # STOP
- #END IF
- # Change the current local directory. The files
- # will be downloaded here.
- # If LOCALCHDIR failed stop the script
- # Exclude files that already exist localy
- # Get the remote file listing, store it in $list
- # If GETLIST failed stop the script
- # For each file in $list...
- # Download the file
- # If the file has been succesfully downloaded
- # delete the remote copy. If not stop the script.
- # Close the connection
In my opinion there are a few extra commands, and so should work
if this is not the case, as before, then paste the command to start and see the result
FTP Script
- # Connect to ftp.myhost.com as myuser
- # Change the current local directory. The files
- # will be downloaded here.
- # If LOCALCHDIR failed stop the script
- # Exclude files that already exist localy
- # Get the remote file listing, store it in $list
- # If GETLIST failed stop the script
- # For each file in $list...
- # Download the file
- # If the file has been succesfully downloaded
- # delete the remote copy. If not stop the script.
- # Close the connection
FTP Script
- verbose (on)