Operating Environment:Windows
scripting features: download database backup files from Target system *.dmp
Execute Method:Windows Task Scheduler timed call file Ftp.bat
file 1:ftp.batecho Start Backup date: >> log.txtdate/t >> log.txtecho start time: >> log.txttime/t >> log.txtecho Delete old backup >> ; log.txtdel/q E:\ftp\data\*ftp-n-S: "E:\ftp\ftp.txt" >> "E:\ftp\log.txt" Echo Complete backup time: >> log.txttime/t >& Gt Log.txt
file 2:ftp.txtOpen destination server IP address user user username password binpromptcd/backuplcd E:\ftp\datamget *.dmpbyeexit
Note: If you are uploading files to the server, simply turn Mget into Mput, and the Log.txt file will download the log for FTP.
Transfer mode:Bin (binary mode), ASC (ASCII mode)
prompt:Toggles between prompt mode on and off. By default, prompt is turned on (execution 1 times prompt will close prompt, execution 2nd times will open, 3rd time off ...). )。 During the transfer of multiple files, the FTP prompt will allow you to selectively retrieve or store files. If prompt is off, Mget and mput will transfer all files.
Cd/backup:Changes the target machine's current directory.
LCD E:\ftp\data:Change the local Machine current directory
mget *.dmp:Download the file with the. dmp suffix from the current directory of the target machine to the current directory of the local machine. If prompt is not previously closed, then downloading the first file requires confirmation but no response, which results in a failure of the script execution (no further execution).
mput *.dmp:Uploads a file with a. dmp suffix from the current directory of the local machine to the current directory of the target machine. If you have only one file to upload or download, you can use the put or get command without using prompt. Http://www.wo81.com/tec/os/win/2014-05-03/189.html
? FTP upload download script for Windows system?