Sample scripts are provided as-is with no warranty of fitness for a particular purpose. These scripts are solely intended to demonstrate techniques for accomplishing common tasks. Additional script logic and error-handling may need to be added to achieve the desired results in your specific environment.
verify_uploads.s
Robo-FTP provides many tools to document the results of your file transfers so you can have the highest possible level of accountability.
This script uploads all the .doc files from a directory. It does two things to document results:
- Create a new log named for the time and date every time it runs.
- Download a directory listing from the server after performing the upload and store it in a file named for the time and date.
The Robo-FTP log file shows every upload. The directory listing from the server shows exactly what was on the server after Robo-FTP finished the uploads. This helps resolve any conflicts that might arise regarding what files were uploaded.
1 ; Create a new log file every time the script runs.
2 ; The log will have the date in it like this:
3 ; daily_upload Oct 30 15.38.43 2007.log
4 log "daily_upload" /new
5 ftplogon "myuploadsite"
6 sendfile "*.doc"
7 ; Download a listing from server and name the file like this:
8 ; Sat Feb 17 11.00.22 2001.txt
9 set dir_file = %datetime + ".txt"
10 ftplist dir_file
11 FTPLOGOFF
12 exit