写upload.bat,内容
@echo offecho 将文件上传至佛山ftprem ftp -s:upload.ftp for /f %%t in ('ftp -s:upload.ftp') do ( set str=%%t)set UPLOADED=falseecho %str% | find "221" > nul&&set UPLOADED=trueif "%UPLOADED%" == "true" ( echo 上传成功 echo 删除本地缓存文件 cd data del /s /f /q *) else ( echo 上传失败 )pause
ftp命令文件:upload.ftp
open ip.comusernamepasswordlcd ./databinpromptmput *bye