windows ftp自动上传bat脚本

@echo off 

echo.

set data=%date:~0,4%-%date:~5,2%-%date:~8,2%

::set /a deldata=data-7 

echo open 101.200.184.137>ftp.txt

echo vftpuser>>ftp.txt

echo vftpuser123456>>ftp.txt

echo binary>>ftp.txt

echo prompt>>ftp.txt

echo cd "~/logbak/robot01/">>ftp.txt

echo lcd "C:\Users\Administrator\log01">>ftp.txt

echo put "%data% .log">>ftp.txt

::echo mdelete data_db_%deldata%*.BAK>>ftp.txt 

echo lcd "C:\Users\Administrator\log02">>ftp.txt

::echo prompt>>ftp.txt

echo cd "~/logbak/robot02/">>ftp.txt

echo put "%data% .log">>ftp.txt

echo close>>ftp.txt

echo bye>>ftp.txt

ftp.exe -s:ftp.txt

echo.

你可能感兴趣的:(windows ftp自动上传bat脚本)