Scripting connection fails
I installed the product today and I'm trying to execute a script connection.
I am able to connect to SFTP using GUI but not by using script.
I created a script below and saved it to the file I:\ProjectMates\Send2PrjMates.txt
Scrip:
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open sftp://user:password@example.com -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
# Connect
# Specal charaters are entered as hexdecimal an "@" is entered as %40
open sftp://SourcePMDynamics:ShvacDynamics%4013@projectmates.com:222
# Change remote directory
cd /Drop
synchronize remote I:\ProjectMates\Send /Drop
# Disconnect
close
# Exit WinSCP
exit
I execute the scrip by opening a command prompt and pasting the command below:
"C:\Program Files (x86)\WinSCP\WinSCP.com" script=I:\ProjectMates\Send2PrjMates.txt
I get the error "Host does not exist"
My password for the SFTP site is ShvacDynamics@13
The port is:222
I am user WinSCP version 5.14 Build3020
on a Windows 7 Pro workstaion
The protocall is SFTP-4
I am able to syncronize using the GUI. What am I doing wrong with the command interface.
Is is also possible to refernce a UNC path for the script and the synchronize command?
I am able to connect to SFTP using GUI but not by using script.
I created a script below and saved it to the file I:\ProjectMates\Send2PrjMates.txt
Scrip:
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open sftp://user:password@example.com -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
# Connect
# Specal charaters are entered as hexdecimal an "@" is entered as %40
open sftp://SourcePMDynamics:ShvacDynamics%4013@projectmates.com:222
# Change remote directory
cd /Drop
synchronize remote I:\ProjectMates\Send /Drop
# Disconnect
close
# Exit WinSCP
exit
I execute the scrip by opening a command prompt and pasting the command below:
"C:\Program Files (x86)\WinSCP\WinSCP.com" script=I:\ProjectMates\Send2PrjMates.txt
I get the error "Host does not exist"
My password for the SFTP site is ShvacDynamics@13
The port is:222
I am user WinSCP version 5.14 Build3020
on a Windows 7 Pro workstaion
The protocall is SFTP-4
I am able to syncronize using the GUI. What am I doing wrong with the command interface.
Is is also possible to refernce a UNC path for the script and the synchronize command?