Please attach a log file.
- martin
It's obvious that the batch file is wrong. You have the^
's wrong. I do not know how else to tell you, to help you to get them right.
Maybe it's time to give up and put everything to a single line:
"C:\WinSCP\WinSCP.com" /log="C:\writable\path\to\log\WinSCP.log" /ini=nul /command "open ftpes://ftpuser:password@sftp.mysite.com/" "synchronize remote \Temp /Distribution/Comp" "exit"
Though the first "The File name, directory name, or volume label syntax is incorrect" error suggests, you might have yet another problem there. I cannot help you with that, if you do not show us the command. You can mask out the sensitive parts. Though, the less information you mask out, the more likely we will be able to help you.
^
's wrong. I do not know how else to tell you, to help you to get them right.
"C:\WinSCP\WinSCP.com" /log="C:\writable\path\to\log\WinSCP.log" /ini=nul /command "open ftpes://ftpuser:password@sftp.mysite.com/" "synchronize remote \Temp /Distribution/Comp" "exit"
I made some modification to the .bat script but still not working:
"C:\WinSCP\WinSCP.exe /log="C:\SFTP\log\t4log_!Y_!M_!D_!T.log" /loglevel=0 /ini=nul /command open ftpes://ftpuser:password@sftp.mysite.com/ ^
That's a wrong syntax.
And stick with thewinscp.com
. Do not usewinscp.exe
in a batch file.
I made some modification to the .bat script but still not working:
"C:\WinSCP\WinSCP.exe /log="C:\SFTP\log\t4log_!Y_!M_!D_!T.log" /loglevel=0 /ini=nul /command open ftpes://ftpuser:password@sftp.mysite.com/ ^
winscp.com
. Do not use winscp.exe
in a batch file.
Thank you. I ran it from command line and it prompts the first line is not a recognized command:
"open ftpes://ftpuser:password@sftp.mysite.com/" ^
echo off
command in the batch file.
There has to be some error message. What do you see in the console, when you execute the batch file? Make sure you execute the batch file in console. Not by double-clicking it in Windows Explorer.
Thank you. I ran it from command line and it prompts the first line is not a recognized command:
"open ftpes://ftpuser:password@sftp.mysite.com/" ^
Thank you
There has to be some error message. What do you see in the console, when you execute the batch file? Make sure you execute the batch file in console. Not by double-clicking it in Windows Explorer.
^
's.
@echo off
"C:\WinSCP\WinSCP.com" ^
/log="C:\writable\path\to\log\WinSCP.log" /ini=nul ^
/command ^
"open ftpes://ftpuser:password@sftp.mysite.com/" ^
"synchronize remote \Temp /Distribution/Comp" ^
"exit"
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%