Hi Guys, having a bit of a problem trying to get this to work. I have worked out the compare the remote and the local files part of this script,and if the remote file size changes , it will download the new files to the local folder. but I can't seem to get the move the files to another local folder after download. I have tried it different ways and still it does not work. It keeps telling me that the EXEC command, " The syntax of the command is incorrect. " I need it to only move the files to the local folder only if new files are downloaded. Is their another way to do this or can anyone help on this matter.
FTP Script
- # Settings
- $ftpserver="xxx.xxx.xxx.xxx"
- $ftpuser="xxxxx"
- $password="xxxxxxxx"
- # Connect to FTP server
- # Change the current local directory. The files
- # will be downloaded here.
- # Change current remote directory to /orders
- # Get the remote file listing, store it in $list
- # For each file in $list...
- # Get the file size of the local and remote file
- # If the sizes are different download
- # local file is replaced if exists
- #Move files to local folder after download
- # Close the connection
FTP Script
Thanks for that. That did the trick.
Thanks for the collaboration Wandrey
liked Script FTP? Try our other product Email Parser