unzip & download@rem ################################################
@echo off
@set SDir=E:\flyfox
@set DDir=D:\backup\tmp
@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%
@echo running ftp.txt >> %log%
@echo open 192.168.1.1> %FtpData%
@echo flyfox>> %FtpData%
@echo aaa>> %FtpData%
@echo bin>> %FtpData%
@echo lcd %SDir%>> %FtpData%
@echo get %file%.exe>> %FtpData%
@echo del %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%
@echo Date: %date%  Time: %time% >> %log%
@7z e %SDir%\%file%.exe -paaa -o%DDir% >> %log%
@echo decompress success! >> %log%
@del %FtpData% >> %log%
@echo delete ftp.txt success! >> %log%
@echo ========================================= >> %log%
@echo on
@exit

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