Hello
I'm a newbie! I've got a great script set up to download some remote files, and then archive them by downloading and uploading a new folder and then deleting the originals, however, I can't get my EXEC command to work to delete the local files after upload. can someone help please? script so far:
there's a little space above for the EXEC command.
I'd like to add error handling and email confirmations/errors but I think I'll get this working first!
I'm a newbie! I've got a great script set up to download some remote files, and then archive them by downloading and uploading a new folder and then deleting the originals, however, I can't get my EXEC command to work to delete the local files after upload. can someone help please? script so far:
FTP Script
- # Connect to FTP server
- # Go to download dir
- # Get all the files in the FTP server
- # Change current local temp dir
- # Download remote files to me moved
- # Change the current remote directory to archive
- # Upload the files
- # Delete the remote files
- # Delete the local file
- # Close the connection
I'd like to add error handling and email confirmations/errors but I think I'll get this working first!
What a great place the world is
managed to sort this as we've changed how we want the files. all i need now is for the email confirmation or error to work, however I can't get blat to load, our Anti-virus is blocking it
What a great place the world is
Hello,
Try downloading Blat from its own web site:
http://sourceforge.net/projects/blat/
As you probably know there is an example on how to use blat here: http://www.scriptftp.com/examples.php?go=send_email.ftp
If your antivirus is still blocking blat.exe try adding blat.exe to the antivirus whitelist.
Regarding the local file deleting, take a look at this example:
[scriptftp="delete_local_file.ftp"]# Delete all temporary files from C:\LocalWebFolder
EXEC("del /F /Q C:\LocalWebFolder\*.tmp")[/ScriptFTP]
More info and examples in this help topic:
Handling local files
http://www.scriptftp.com/reference.php?go=topic113
Try downloading Blat from its own web site:
http://sourceforge.net/projects/blat/
As you probably know there is an example on how to use blat here: http://www.scriptftp.com/examples.php?go=send_email.ftp
If your antivirus is still blocking blat.exe try adding blat.exe to the antivirus whitelist.
Regarding the local file deleting, take a look at this example:
[scriptftp="delete_local_file.ftp"]# Delete all temporary files from C:\LocalWebFolder
EXEC("del /F /Q C:\LocalWebFolder\*.tmp")[/ScriptFTP]
More info and examples in this help topic:
Handling local files
http://www.scriptftp.com/reference.php?go=topic113
liked Script FTP? Try our other product Email Parser