@echo off
::定義FTP登入帳號密碼
set server=10.0.0.1
set username=001
set password=001
set serverpath=/users/001/
::定義日期格式
set YYYYMMDD=%date:~0,4%%date:~5,2%%date:~8,2%
set /A Date0=%YYYYMMDD%-0
set /A Date1=%YYYYMMDD%-1
set /A Date2=%YYYYMMDD%-2
::定義檔案格式
set File1=AAAA.%Date0%
set File2=BBBB.%Date0%
::定義FTP動作檔
set FTPActions=00000000000000.FTP
:Filestart
echo open %server%>>%FTPActions%
echo %username%>>%FTPActions%
echo %password%>>%FTPActions%
echo cd %serverpath%>>%FTPActions%
echo get %File1%>>%FTPActions%
echo get %File2%>>%FTPActions%
echo bye>>%FTPActions%
::動作執行檔
ftp -s:%FTPActions%
del %FTPActions%
阅读(1330) | 评论(0) | 转发(0) |