zip & upload@rem ################################################
@echo off
@set SDir=D:\flyfox\tmp
@set DDir=E:\backup
@set FtpData=D:\bat\ftp.txt
@set file=flyfox_%date:~0,4%%date:~5,2%%date:~8,2%
@set log=D:\bat\log\log-%date:~0,4%%date:~5,2%%date:~8,2%-%time:~0,2%%time:~3,2%%time:~6,2%.txt
@set log=%log: =0%
@set 7z=C:\Program Files\7-Zip\7z.exe
@echo ========================================= > %log%
@echo Date: %date%  Time: %time% >> %log%
@7z a -mmt=4 -mx=9 -sfx %DDir%\%file%.exe -paaa -mhe %SDir%\%file%.bak && echo. >> %log%
@echo compress success! >> %log%
@echo ========================================= >> %log%
@echo Date: %date%  Time: %time% >> %log%
@echo running ftp.txt >> %log%
@echo open 192.168.1.1> %FtpData%
@echo flyfox>> %FtpData%
@echo aaa>> %FtpData%
@echo bin>> %FtpData%
@echo lcd %DDir%>> %FtpData%
@echo put %file%.exe>> %FtpData%
@echo rename %file%.exe tmp\%file%.exe>> %FtpData%
@echo by>> %FtpData%
@echo ========================================= >> %log%
@echo Date: %date%  Time: %time% >> %log%
@echo running ftp >> %log%
@ftp -s:%FtpData% >> %log%
@echo FTP Success! >> %log%
@echo ========================================= >> %log%
@del %FtpData% >> %log%
@echo on
@pause

flyfox 發表在 痞客邦 PIXNET 留言(0) 人氣()