******************************backupscript.bat (start)******************************* @echo off setlocal set LogPath=D:\backup\logs\ set LogFileExt=.log set LogFileName=ProjectA_Daily Backup%LogFileExt% set MyLogFile=%date% set MyLogFile=%MyLogFile:/=-% set MyLogFile=%LogPath%%MyLogFile%_%LogFileName% If NOT Exist "%MyLogFile%" goto:noseparator echo.>>"%MyLogFile%" echo.===================>>"%MyLogFile%" :noseparator set month=%date:~4,2% set day=%date:~7,2% set year=%date:~10,4% set dir1="D:\backup" set dir2="backupdrive/ProjectA" TITLE Project A Server backup >>"%MyLogFile%" "C:\Program Files\WinRAR\WinRAR.exe" a -m5 -ep3 -s -r -t -inull -ibck –agYYYYMMDD-NN ProjectA_backup @C:\backup.txt > c:\script.ftp ECHO open 192.168.1.1 >>c:\script.ftp ECHO username >>c:\script.ftp ECHO password >>c:\script.ftp ECHO cd %dir2% >>c:\script.ftp ECHO cd %year%-%month%-%day% >>c:\script.ftp ECHO binary >>c:\script.ftp ECHO hash >>c:\script.ftp ECHO put *%year%%month%%day%-01.rar >>c:\script.ftp ECHO put *%year%%month%%day%-02.rar >>c:\script.ftp ECHO put *%year%%month%%day%-03.rar >>c:\script.ftp ECHO dir >>c:\script.ftp ECHO bye echo.%Date% >>"%MyLogFile%" echo.%Time% >>"%MyLogFile%" echo. >>"%MyLogFile%" ECHO Backup file created. >>"%MyLogFile%" echo. >>"%MyLogFile%" echo Backup file is being sent to FTP server >>"%MyLogFile%" echo. >>"%MyLogFile%" cd\ >>"%MyLogFile%" d: >>"%MyLogFile%" cd backup >>"%MyLogFile%" dir >>"%MyLogFile%" FTP -v -s:"c:\script.ftp" >>"%MyLogFile%" DEL c:\script.ftp >>"%MyLogFile%" echo. >>"%MyLogFile%" echo Todays backup completed. >>"%MyLogFile%" echo.%Date% >>"%MyLogFile%" echo.%Time% >>"%MyLogFile%" call "D:\backup\logs\log.bat" ****************************backupscript.bat (end)*************************** **************************log.bat (start)********************************** @echo off setlocal set month=%date:~4,2% set day=%date:~7,2% set year=%date:~10,4% set dir1="D:\backup\logs\" set dir2="backup/logs" > c:\script1.ftp ECHO open 192.168.1.1 >>c:\script1.ftp ECHO username >>c:\script1.ftp ECHO password >>c:\script1.ftp ECHO cd %dir2% >>c:\script1.ftp ECHO cd %year%-%month%-%day% >>c:\script1.ftp ECHO ascii >>c:\script1.ftp ECHO put *%month%%day%%year%*.* >>c:\script1.ftp ECHO put *%day%%month%%year%*.* >>c:\script1.ftp ECHO put *%year%%month%%day%*.* >>c:\script1.ftp ECHO put *%month%_%day%_%year%*.* >>c:\script1.ftp ECHO put *%day%_%month%_%year%*.* >>c:\script1.ftp ECHO put *%year%_%month%_%day%*.* >>c:\script1.ftp ECHO put *%month%-%day%-%year%*.* >>c:\script1.ftp ECHO put *%day%-%month%-%year%*.* >>c:\script1.ftp ECHO put *%year%-%month%-%day%*.* >>c:\script1.ftp ECHO bye cd\ d: cd backup\logs FTP -v -s:"c:\script1.ftp" >null DEL c:\script1.ftp CLS EXIT *****************************log.bat (end)***********************************