尝试直接连接到ftp的子文件夹失败。移动到ftp的子文件夹
它显示
未知的主机ftp://ftp2.xxx.com/test/949010。需要帮助please.thanks
SET "Server=ftp://ftp2.xxx.com/test/949010"
SET "UserName=xxx"
SET "Password=x:nj*~A+"
SET "Commands=%TEMP%SendToFTP_commands.txt"
ECHO %UserName%> %Commands%
ECHO %Password%>> %Commands%
ECHO binary >> %Commands%
ECHO put "C:\Users\Desktop\Processed\*" >> %Commands%
REM Close the FTP connection.
ECHO close >> %Commands%
ECHO bye >> %Commands%
REM Perform the FTP.
FTP -d -i -s:%Commands% %Server%
ECHO.
ECHO.
pause
REM Clean up.
IF EXIST %Commands% DEL %Commands%
'%TEMP%'不(通常)不包含尾随的'\',所以你需要将它添加到你的'set'语句中:'SET“命令=%TEMP%\ SendToFTP_commands.txt”' – aschipfl
无法连接到ft p ftp://ftp2.xxx.com/test/949010 – william123456
1.在set set Commands = ...行之后放置这行时,echo“%Commands%”'返回什么? 2.你的代码放在括号'()'之间的块中,还是你发布的所有内容? – aschipfl