Scripted synchronize doesn't seem to work

Advertisement

Guest

Scripted synchronize doesn't seem to work

Hi,

Firstly my apologies if what i'm asking is very stupid as i'm new to the product which i think is great by the way.

Basically I would like to sync all the from my local server to a remote server, both are running Win 2003. The remote server is running OpenSSH.

Now if I use the GUI interface to do the sync selecting the options remote and synchronize files this works perfectly. I need to be run from a script though.

Now here is the script I am failing with at present:

"C:\Program Files\WinSCP\winSCP.exe" /console /log=log.txt /script=copy.bat

Copy.bat >

option batch continue
option confirm off
open <user>:<password>@<server>
transfer binary
synchronize remote G:\wwwroot\testprod /cygdrive/c/Temp
close
exit


When this runs i get the following output:

winscp>synchronize remote G:\wwwroot\testprod /cygdrive/c/Temp
Comparing 'G:\wwwroot\testprod' with '/cygdrive/c/Temp'...
winscp>


At this point it returns to the command point and when i look at the folder nothing is copied.

Now if i change the command to local it happily sync the files.

Can someone please tell me if i'm missing something basic here?


Many thanks,
Simon
FYI here is the lof output for the failing sync:

. 2007-11-27 23:41:06.110 Using SFTP protocol.
. 2007-11-27 23:41:06.110 Doing startup conversation with host.
> 2007-11-27 23:41:06.110 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2007-11-27 23:41:06.423 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2007-11-27 23:41:06.423 SFTP version 3 negotiated.
. 2007-11-27 23:41:06.423 We believe the server has signed timestamps bug
. 2007-11-27 23:41:06.423 We will use UTF-8 strings for status messages only
. 2007-11-27 23:41:06.423 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2007-11-27 23:41:06.423 Getting current directory name.
. 2007-11-27 23:41:06.423 Getting real path for '.'
> 2007-11-27 23:41:06.423 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2007-11-27 23:41:06.517 Type: SSH_FXP_NAME, Size: 53, Number: 16
. 2007-11-27 23:41:06.517 Real path is '/cygdrive/c/Temp'
. 2007-11-27 23:41:06.517 Startup conversation with host finished.
. 2007-11-27 23:41:06.517 Collecting synchronization list for local directory 'G:\wwwroot\testprod' and remote directory '/cygdrive/c/Temp', mode = 0, params = 7
. 2007-11-27 23:41:06.517 Listing directory "/cygdrive/c/Temp".
> 2007-11-27 23:41:06.517 Type: SSH_FXP_OPENDIR, Size: 25, Number: 267
< 2007-11-27 23:41:06.626 Type: SSH_FXP_HANDLE, Size: 13, Number: 267
> 2007-11-27 23:41:06.626 Type: SSH_FXP_READDIR, Size: 13, Number: 524
< 2007-11-27 23:41:06.720 Type: SSH_FXP_NAME, Size: 337, Number: 524
> 2007-11-27 23:41:06.720 Type: SSH_FXP_READDIR, Size: 13, Number: 780
< 2007-11-27 23:41:06.829 Type: SSH_FXP_STATUS, Size: 28, Number: 780
< 2007-11-27 23:41:06.829 Status/error code: 1
> 2007-11-27 23:41:06.829 Type: SSH_FXP_CLOSE, Size: 13, Number: 1028
. 2007-11-27 23:41:06.829 Closing connection.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,097
Location:
Prague, Czechia

Re: Scripted synchronize doesn't seem to work

As you connect to Windows server, you probably have to adjust DST session setting. I guess that in GUI you use stored session with setting adjusted. While in script you seem to open ad hoc session with default settings.

Reply with quote

Advertisement

You can post new topics in this forum