1. The use of WinRAR to build a compressed package
First, the file path to be backed up is collected in a text file, as in my rat.txt, the contents are as follows:
"C:\Documents and settings\evanzhang\desktop\untitled." JPG "
"C:\Documents and Settings\evanzhang\desktop\ stationery collar confirmation form. xls"
"C:\Documents and Settings\evanzhang\desktop\test.exe"
Create Backup.bat files, as follows
"C:\Program Files\winrar\winrar.exe" a-m5-k-t-ag[yyyy-mm-dd-hh-mm-ss] C:\backup-.rar @c:\rar.txt
-A add files to the compressed file
-M5 Set Compression ratio
-K Locking compressed file does not allow editing
-T post-compression test
-ag generate file name with current date
C:\backup-rar to generate a compressed packet prefix
@c:\rar.txt files to compress
2. Set up FTP command batch processing
Add the following line to Backup.bat
Ftp-s:c:\ftp.txt
Set up, ftp.txt content as follows
Open ***.***.***.***
User
Password
Bin
Put Back*.rar
Bye
Open host name such as Open
User FTP username
Password FTP account password
Bin is delivered in 2
Put Back*.rar is to upload the file that you just compressed with rar
Bye for End FTP dialog
3. Specify the elapsed time in the Windows work plan Backup.bat
4. Test
The complete contents of Backup.bat are as follows:
"C:\Program Files\winrar\winrar.exe" a-m5-k-t-ag[yyyy-mm-dd-hh-mm-ss] C:\backup.rar @c:\rar.txt
Ftp-s:c:\ftp.txt
The complete contents of Rar.txt are as follows:
"C:\Documents and settings\evanzhang\desktop\untitled." JPG "
"C:\Documents and Settings\evanzhang\desktop\ stationery collar confirmation form. xls"
"C:\Documents and Settings\evanzhang\desktop\test.exe"
The complete contents are as follows:
Open ***.***.***.***
User
Password
Bin
Put Back*.rar
Bye
Run the test and the results are as follows:
Ftp> Connected to **.**.**.**
Open **.**.**.**
Serv-u FTP Server v6.3 for WinSock ready ...
User (**.**.**.** (none)):
331 User name Okay, need password.
230 User logged in, proceed.
Ftp> bin
Type set to I.
Ftp> put Back*.rar
PORT Command successful.
Opening BINARY mode data connection for Backup[2006-09-14-13-30-06].rar.
Transfer complete.
ftp:747412 Bytes sent in 11.94Seconds 62.61kbytes/sec.
Ftp> bye
221 goodbye!
Because winrar compression really graphics interface compression, so do not see the compression record, if it is under the Linux use of tar compression, compression records will see very clearly.