Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
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)

Options

Topic review

anirudh.chhabra

Got it working. Was missing the local option - and need to give full paths.

So the correct command is :

synchronize local "F:\apps" docs

where F:\apps - my local directory
docs - my remote directory
anirudh.chhabra

Error Resolving Remote Directory - Code 12

Hi,

I am using WinScp version 4.2.7 to synchronise documents from my remote server to local machine. On my remote server, I have FreeSSHD set up as the FTP Server and have defined the SFTP home path as F:/

Now, I need to syncronise F:/apps/Docs from my Remote to F:/apps/Docs on my local. Apparently, when I provide the remote directory path, WinScp cannot resolve it. I have tried all options (apps, F:/apps, F:\\apps etc) but it doesn't seem to work.

Here is the my script:
----------------------
# Automatically answer all prompts negatively not to stall

# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open qhubProd
# Change remote directory
 cd /apps
# Force binary mode transfer
option transfer binary
synchronize docs f:/apps/docs
# Exit WinSCP
exit

Here is the log file:
----------------------
2010-11-15 13:52:21.640 --------------------------------------------------------------------------

. 2010-11-15 13:52:21.640 WinSCP Version 4.2.7 (Build 758) (OS 5.0.2195 Service Pack 4)
. 2010-11-15 13:52:21.640 Login time: Monday, November 15, 2010 1:52:21 PM
. 2010-11-15 13:52:21.640 --------------------------------------------------------------------------
. 2010-11-15 13:52:21.640 Session name: QhubProd
. 2010-11-15 13:52:21.640 Host name: xxx.xx.xxx.xx (Port: 22)
. 2010-11-15 13:52:21.640 User name: qhubftp (Password: No, Key file: Yes)
. 2010-11-15 13:52:21.640 Tunnel: No
. 2010-11-15 13:52:21.640 Transfer Protocol: SFTP (SCP)
. 2010-11-15 13:52:21.640 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2010-11-15 13:52:21.640 Proxy: none
. 2010-11-15 13:52:21.640 SSH protocol version: 2; Compression: No
. 2010-11-15 13:52:21.640 Bypass authentication: No
. 2010-11-15 13:52:21.640 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2010-11-15 13:52:21.640 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2010-11-15 13:52:21.640 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2010-11-15 13:52:21.640 SFTP Bugs: -,-
. 2010-11-15 13:52:21.640 Return code variable: Autodetect; Lookup user groups: Yes
. 2010-11-15 13:52:21.640 Shell: default, EOL: 0
. 2010-11-15 13:52:21.640 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2010-11-15 13:52:21.640 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2010-11-15 13:52:21.640 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2010-11-15 13:52:21.640 Cache directory changes: Yes, Permanent: Yes
. 2010-11-15 13:52:21.640 DST mode: 1
. 2010-11-15 13:52:21.640 --------------------------------------------------------------------------
. 2010-11-15 13:52:21.640 Looking up host "x.x.x.x"
. 2010-11-15 13:52:21.640 Connecting to x.x.x.x. port 22
. 2010-11-15 13:52:22.281 Server version: SSH-2.0-WeOnlyDo 2.1.3
. 2010-11-15 13:52:22.281 Using SSH protocol version 2
. 2010-11-15 13:52:22.281 We claim version: SSH-2.0-WinSCP_release_4.2.7
. 2010-11-15 13:52:22.578 Using Diffie-Hellman with standard group "group14"
. 2010-11-15 13:52:22.578 Doing Diffie-Hellman key exchange with hash SHA-1
. 2010-11-15 13:52:23.500 Host key fingerprint is:
. 2010-11-15 13:52:23.500 ssh-rsa 1024 x.x.x.x.x.x.x.x.x.x.x.x..x.x.x.x.x.x
. 2010-11-15 13:52:23.500 Initialised AES-256 CBC client->server encryption
. 2010-11-15 13:52:23.500 Initialised HMAC-SHA1 client->server MAC algorithm
. 2010-11-15 13:52:23.796 Initialised AES-256 CBC server->client encryption
. 2010-11-15 13:52:23.796 Initialised HMAC-SHA1 server->client MAC algorithm
. 2010-11-15 13:52:24.093 Reading private key file "C:\SIGMA\jobs\docSync\keys\qhubftp\privateKey-qhubftp.ppk"
! 2010-11-15 13:52:24.093 Using username "xxxxxx".
. 2010-11-15 13:52:24.406 Offered public key
. 2010-11-15 13:52:24.703 Offer of public key accepted
! 2010-11-15 13:52:24.703 Authenticating with public key "rsa-key-20101006"
. 2010-11-15 13:52:25.125 Access granted
. 2010-11-15 13:52:25.437 Opened channel for session
. 2010-11-15 13:52:26.171 Started a shell/command
. 2010-11-15 13:52:26.171 --------------------------------------------------------------------------
. 2010-11-15 13:52:26.171 Using SFTP protocol.
. 2010-11-15 13:52:26.171 Doing startup conversation with host.
> 2010-11-15 13:52:26.171 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2010-11-15 13:52:26.937 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2010-11-15 13:52:26.937 SFTP version 3 negotiated.
. 2010-11-15 13:52:26.937 We believe the server has signed timestamps bug
. 2010-11-15 13:52:26.937 We will use UTF-8 strings for status messages only
. 2010-11-15 13:52:26.937 Getting current directory name.
. 2010-11-15 13:52:26.937 Getting real path for '.'
> 2010-11-15 13:52:26.937 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2010-11-15 13:52:27.218 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2010-11-15 13:52:27.218 Real path is '/'
. 2010-11-15 13:52:27.218 Startup conversation with host finished.
. 2010-11-15 13:52:27.234 Cached directory change via "/apps" to "/apps".
. 2010-11-15 13:52:27.234 Getting current directory name.
. 2010-11-15 13:52:27.234 Closing connection.
. 2010-11-15 13:52:27.234 Sending special code: 12
. 2010-11-15 13:52:27.234 Sent EOF message


Will greatly appreciate your help in this.

Thanks,
Anirudh