Problem in executing the batch file in winscp

↘锁芯ラ 提交于 2019-12-04 21:11:42
Shahsra

Thanks to Andriy M. His comments cleared my confusion and gave the right answer.

Here are the right syntax.

C:\somefolder\WinSCP3.exe /console /script=E.txt /log=session.log

xcopy C:\somefolder\up\*.*  C:\somefolder\down\  /y
del  C:\somefolder\up\*.*   /Q

if errorlevel 1 goto error

:error
echo Upload failed, keeping local files

The content in text file E.txt is:

option batch abort
option confirm off
open @test.com 
change remote directory
cd \somedirectory
option transfer binary
put C:\somefolder\up\*.*
close
exit

Dunno if anyone still read this thread or not.. But what I know is "put" command upload the files from Local Directory to Remote Directory. TS wanted to "download the files from Remote Directory to Local Directory" so I think the right command is "get".

Cheers, Shen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!