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 sftp://xx_xx@xx.co.net.xx/ -hostkey="ssh-rsa 2048
OZmbfQXMfIAAkZ/08lzjZTIbFOhnEz7+UY3lhJHpst8=" -privatekey="D:\XXX\Key File
Shared\XXXprivate key.ppk" -passphrase="XXX1234" -rawsettings ProxyMethod=3
ProxyHost="10.00.00.00" ProxyUsername="SVC_XXX" ProxyPassword="FUg7sT5kVX5Om9"
synchronize remote "D:\XXX\DATA" /XX_XXXX_SFTP
exit
When i run the script in the Command Mode(CMD) it is working perfectly.
here is the command
C:\Program Files (x86)\WinSCP>winscp.com /script="D:\XXX\SyncToRemoteXXXScript.txt"
When we use the same command on the Batch File
winscp.com /script="D:\XXX\SyncToRemoteXXXScript.txt"
pause
I hope the issue is not able find the WinSCP command,
so unable to execute the Batch File.
Can you please help.
Regards,
Venkat
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 sftp://xx_xx@xx.co.net.xx/ -hostkey="ssh-rsa 2048
OZmbfQXMfIAAkZ/08lzjZTIbFOhnEz7+UY3lhJHpst8=" -privatekey="D:\XXX\Key File
Shared\XXXprivate key.ppk" -passphrase="XXX1234" -rawsettings ProxyMethod=3
ProxyHost="10.00.00.00" ProxyUsername="SVC_XXX" ProxyPassword="FUg7sT5kVX5Om9"
synchronize remote "D:\XXX\DATA" /XX_XXXX_SFTP
exit
When i run the script in the Command Mode(CMD) it is working perfectly.
here is the command
C:\Program Files (x86)\WinSCP>winscp.com /script="D:\XXX\SyncToRemoteXXXScript.txt"
When we use the same command on the Batch File
winscp.com /script="D:\XXX\SyncToRemoteXXXScript.txt"
pause
I hope the issue is not able find the WinSCP command,
so unable to execute the Batch File.
Can you please help.
Regards,
Venkat