Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review



Set at the Windows Path and Environment the location of the in order to be run from any folder.

Re: Batch - WinSCP Scripts are not working

You should contact your local network administrator. We cannot help you with an authentication to your proxy server.

Re: Batch - WinSCP Scripts are not working

Hi Martin,
Running though WinSCP GUI it was working absolutely fine.
Once I created the script and schedule in the Task Scheduler I am getting this error message.
Now the Winsock GUI is also not working.
Error message:
proxy:403 forbidden.

I checked in another system it was working fine with WinSCP GUI.

I think it is not releasing the session or cache after executing the batch file.

Tried to clear the all data and created a fresh still the same problem.

I am really struck at this time.since we are not able to automate the process.


Re: Batch - WinSCP Scripts are not working

How do you run your batch file? It looks like you are running it by some service account. I assume the account is not authorized to your proxy server.

Re: Batch - WinSCP Scripts are not working

Tried to change the .BAT File based on the recommendation in other messages
"C:\Program Files (x86)\WinSCP\" /log="D:\XXX\Setup - WinSCP\Auto\WinSCP.log" /ini=nul /script="D:\XXX\SyncToRemoteXXXScript.txt"

Get the error message:
Proxy error: 403 Forbidden

Attaching the Logfile & Script File.

Batch - WinSCP Scripts are not working

Hi All,

We are trying the option of synchronizing the folder local directory to the SFTP directory.
Here is the script file details
option batch abort
option confirm off
open s -hostkey="ssh-rsa 2048 OZmbfQXMfIAAkZ/08lzjZTIbFOhnEz7+UY3lhJHpst8=" -privatekey="D:\XXX\Key File Shared\XXXprivate key.ppk" -passphrase="XXX1234" -rawsettings ProxyMethod=3 ProxyHost="" ProxyUsername="SVC_XXX" ProxyPassword="FUg7sT5kVX5Om9"
synchronize remote "D:\XXX\DATA" /XX_XXXX_SFTP

When I run the script in the Command Mode (CMD) it is working perfectly.
Here is the command
C:\Program Files (x86)\WinSCP> /script="D:\XXX\SyncToRemoteXXXScript.txt"

When we use the same command on the batch File /script="D:\XXX\SyncToRemoteXXXScript.txt"

I hope the issue is not able find the WinSCP command, so unable to execute the batch File.

Can you please help.