kmideas wrote:
I got the connection to work by updating the command string to:
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /command "option confirm off" "open ABCD_XYZ@66.***.**.***" -cmd="put C:\Users\My Docs\Documents\Export Files\Data_Export\Export.xml" /log=C:\Secure_FTP_Log.txt "exit"
I'm using the -cmd to make the put command work because I wasn't able to get it to work using double quotes.
The error log indicates the path on the server isn't designated. However when I run session user in Command Interface, I log into the correct directory on the server.
. 2012-07-23 13:24:09.196 Using SFTP protocol.
. 2012-07-23 13:24:09.198 Doing startup conversation with host.
> 2012-07-23 13:24:09.198 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2012-07-23 13:24:09.423 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2012-07-23 13:24:09.423 SFTP version 3 negotiated.
. 2012-07-23 13:24:09.423 We believe the server has signed timestamps bug
. 2012-07-23 13:24:09.423 We will use UTF-8 strings for status messages only
. 2012-07-23 13:24:09.424 Getting current directory name.
. 2012-07-23 13:24:09.424 Getting real path for '.'
> 2012-07-23 13:24:09.424 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2012-07-23 13:24:09.437 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2012-07-23 13:24:09.437 Real path is '/'
. 2012-07-23 13:24:09.437 Startup conversation with host finished.
< 2012-07-23 13:24:09.437 Script: Active session: [1] ABCD_XYZ@66.***.**.***
. 2012-07-23 13:24:09.437 Script: Exit code: 0
. 2012-07-23 13:24:09.437 Closing connection.
. 2012-07-23 13:24:09.437 Sending special code: 12
. 2012-07-23 13:24:09.438 Sent EOF message
Where do I designate the real path for '.'
and Real path is '/' ?
Thanks
I got it to work by using the following:
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /command "option confirm off" "open ABCD_XYZ@66.***.**.***" "put C:\Export.xml" /log=C:\Secure_FTP_Log.txt "exit"
I moved the file to be FTP'd to the root folder. The previous location had spaces in the folder names. I couldn't figure out how to use the double-quotes to handle them.
If the file is in C:\Users\My Docs\Documents\Export Files\Data_Export\Export.xml
I've tried: "put "C:\Users\My Docs\Documents\Export Files\Data_Export\Export.xml"",
"put C:\Users\"My Docs"\Documents\"Export Files"\Data_Export\Export.xml""
How do you do it?
Thanks