WINSCP hangs when invoked from .bat file

Advertisement

alanp
Guest

WINSCP hangs when invoked from .bat file

We have been using WINSCP successfully for over 3 years to batch transfer files using SFTP. Last Saturday all the jobs started to hang invoking WINSCP.

We have 11 MS SQL 2008 R2 agent jobs that periodically invoke 11 different .bat files that call winscp.com to SFTP files to 11 separate servers.
The Last Saturday night they all hung when invoking WINSCP and no output was produced.

I have upgraded to WINSCP 5.7.3 but no change.

I know that the .bat file is called because the previous commands are executed but it hangs invoking WINSCP
Invoking the .bat file from a DOS cmd window works correctly every time. Starting the WINSCP gui also works.

Command to invoke WINSCP
C:\Program Files (x86)\WinSCP\WinSCP.com" -script="SFTP logs\SFTPScript.txt" -log="SFTP logs\SFTP.log"

Nothing is logged in SFTP.log

As far as I know nothing has changed on the system

Help!
Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,540
Location:
Prague, Czechia

Re: WINSCP hangs when invoked from .bat file

What version of WinSCP were you using before?
If it was 5.2.4 or older, you might be a victim of this bug:
https://winscp.net/tracker/996

You need to upgrade WinSCP (what you did already) AND restart the machine to recover it.

Reply with quote

Advertisement

You can post new topics in this forum