set SCRIPT_FILE=ftpScript.txt
set SERVER_ADDR=192.168.1.10
set USER=ftpadmin
set PASSWORD=ftppass123
echo open %SERVER_ADDR% > %SCRIPT_FILE%
echo %USER% >> %SCRIPT_FILE%
echo %PASSWORD% >> %SCRIPT_FILE%
for /f %%i in ('dir /s D:') do (
echo put %%i >> %SCRIPT_FILE%
)
echo quit >> %SCRIPT_FILE%
ftp -s:%SCRIPT_FILE%
pause
保存成bat文件,找个putty试试