Hi - I am trying to get what I thought would be a simple scripted file upload to a server I don't have any control over - the only thing I know is that I am to use SSH2. Even when I log on manually to the WinSCP session, double clicking on the host directory off the root that I have access to gives me an error that it can't find d:\sftp\DirectoryName.
However, I can drag a file from the local root and drop it on top of the host directory and the transfer works. So whether running the script shown below or manually navigating to the site, I get an error trying to change the host directory for an unknown reason.
The script I ran is:
open "County_SFTP"
cd /DirectoryName
put "Client Report.pdf"
exit
When I do the same site access using Filezilla set to SSH2 protocol, I can pop in and out of the remote directory with no issues on the same site, which tells me it's possible to do. I'm not 100 percent sure that all of the more granular settings in WinSCP are right. However, on my locally run SFTP site even with WinSCP I can easily get into and out of the host directory. So not sure why this destination server is being fussy or exactly what the real story is.
In case this helps, here's the section of the log that shows the error.... Any clues would be greatly appreciated!
. 2010-04-09 12:17:03.211 Startup conversation with host finished.
. 2010-04-09 12:17:03.211 Changing directory to "/DirectoryName".
. 2010-04-09 12:17:03.211 Getting real path for '/DirectoryName'
> 2010-04-09 12:17:03.211 Type: SSH_FXP_REALPATH, Size: 17, Number: 528
< 2010-04-09 12:17:03.289 Type: SSH_FXP_NAME, Size: 39, Number: 528
. 2010-04-09 12:17:03.289 Real path is '/DirectoryName'
. 2010-04-09 12:17:03.289 Trying to open directory "/DirectoryName".
> 2010-04-09 12:17:03.289 Type: SSH_FXP_LSTAT, Size: 17, Number: 775
< 2010-04-09 12:17:03.383 Type: SSH_FXP_STATUS, Size: 76, Number: 775
< 2010-04-09 12:17:03.383 Status code: 2, Message: 775, Server: syserr: No such file or directory, file: D:\SFTP\DirectoryName\, Language: en
* 2010-04-09 12:17:03.383 (ECommand) Error changing directory to '/DirectoryName'.
* 2010-04-09 12:17:03.383 No such file or directory.
* 2010-04-09 12:17:03.383 Error code: 2
* 2010-04-09 12:17:03.383 Error message from server (en): syserr: No such file or directory, file: D:\SFTP\DirectoryName\