Topic "Synchronize script"

Author Message
rej
[View user's profile]

Joined: 2007-06-12
Posts: 2
Clearly I am being dumb here, but I cannot get a script to synchronize a Windows folder with one on Solaris. I have read the documentation and the FAQ with great care.

Here's my command:

C:\PROGRA~1\WinSCP3\WinSCP3.exe /log="C:\Documents and Settings\Will\My Documents\newwinscp.log" /script="C:\Documents and Settings\Will\My Documents\winscp-script.txt"

Here's the script:

option echo on
option batch on
option confirm off
open raptor
synchronize "C:\Documents and Settings\Will\My Documents\School\" /home/rej/will/School
close
exit

I've tried with options, echo on and without echo, with batch on and batch continue.

"raptor" is a saved session that works fine in GUI mode as does the synchronize line. That line also works as a command line BUT I have to click OK in a dialogue box (I want this to run unattended).

Here's the log file. As far as I can see, all runs without any commands exiting with errors.

. 2007-06-12 22:38:02.593 --------------------------------------------------------------------------
. 2007-06-12 22:38:02.593 WinSCP Version 3.8.2 (Build 330) (OS 5.1.2600 Service Pack 2)
. 2007-06-12 22:38:02.593 Login time: 12 June 2007 22:38:02
. 2007-06-12 22:38:02.593 --------------------------------------------------------------------------
. 2007-06-12 22:38:02.593 Session name: raptor
. 2007-06-12 22:38:02.593 Host name: raptor.kent.ac.uk (Port: 22)
. 2007-06-12 22:38:02.593 User name: rej (Password: No, Key file: Yes)
. 2007-06-12 22:38:02.593 Transfer Protocol: SFTP (SCP)
. 2007-06-12 22:38:02.593 SSH protocol version: 2; Compression: No
. 2007-06-12 22:38:02.593 Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2007-06-12 22:38:02.593 Ciphers: aes,blowfish,3des,WARN,des; Ssh2DES: No
. 2007-06-12 22:38:02.593 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2007-06-12 22:38:02.593 SSH Bugs: -,-,-,-,-,-,-,-
. 2007-06-12 22:38:02.593 SFTP Bugs: -,-,-
. 2007-06-12 22:38:02.593 Proxy: none
. 2007-06-12 22:38:02.593 Return code variable: Autodetect; Lookup user groups: Yes
. 2007-06-12 22:38:02.593 Shell: default, EOL: 0
. 2007-06-12 22:38:02.593 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2007-06-12 22:38:02.593 Cache directory changes: Yes, Permanent: Yes
. 2007-06-12 22:38:02.593 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2007-06-12 22:38:02.593 Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No
. 2007-06-12 22:38:02.593 --------------------------------------------------------------------------
. 2007-06-12 22:38:02.593 Looking up host "raptor.kent.ac.uk"
. 2007-06-12 22:38:02.593 Connecting to 129.12.4.232 port 22
. 2007-06-12 22:38:02.703 Server version: SSH-1.99-OpenSSH_4.6
. 2007-06-12 22:38:02.703 We claim version: SSH-2.0-WinSCP_release_3.8.2
. 2007-06-12 22:38:02.703 Using SSH protocol version 2
. 2007-06-12 22:38:02.750 Doing Diffie-Hellman group exchange
. 2007-06-12 22:38:02.859 Doing Diffie-Hellman key exchange
. 2007-06-12 22:38:03.343 Host key fingerprint is:
. 2007-06-12 22:38:03.343 ssh-rsa 1024 7c:25:40:0c:b9:ca:12:ab:6d:34:52:ee:30:da:50:05
. 2007-06-12 22:38:03.343 Initialised AES-256 client->server encryption
. 2007-06-12 22:38:03.343 Initialised HMAC-SHA1 client->server MAC algorithm
. 2007-06-12 22:38:03.343 Initialised AES-256 server->client encryption
. 2007-06-12 22:38:03.343 Initialised HMAC-SHA1 server->client MAC algorithm
! 2007-06-12 22:38:03.484 Using username "rej".
. 2007-06-12 22:38:03.484 Reading private key file "C:\Documents and Settings\All Users\Documents\Will\identity.ppk"
. 2007-06-12 22:38:03.531 Offered public key
. 2007-06-12 22:38:03.562 Offer of public key accepted
! 2007-06-12 22:38:03.562 Authenticating with public key "rsa-key-20070601".
. 2007-06-12 22:38:03.781 Access granted
. 2007-06-12 22:38:03.828 Opened channel for session
. 2007-06-12 22:38:03.875 Started a shell/command
. 2007-06-12 22:38:03.875 --------------------------------------------------------------------------
. 2007-06-12 22:38:03.875 Using SFTP protocol.
. 2007-06-12 22:38:03.875 Doing startup conversation with host.
> 2007-06-12 22:38:03.875 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2007-06-12 22:38:03.968 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2007-06-12 22:38:03.968 SFTP version 3 negotiated.
. 2007-06-12 22:38:03.968 We believe the server has signed timestamps bug
. 2007-06-12 22:38:03.968 We will use UTF-8 strings for status messages only
. 2007-06-12 22:38:03.968 Limiting packet size to OpenSSH limit of 262148 bytes
. 2007-06-12 22:38:03.968 Getting current directory name.
. 2007-06-12 22:38:03.968 Getting real path for '.'
> 2007-06-12 22:38:03.968 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2007-06-12 22:38:04.015 Type: SSH_FXP_NAME, Size: 47, Number: 16
. 2007-06-12 22:38:04.015 Real path is '/home/rej'
. 2007-06-12 22:38:04.015 Startup conversation with host finished.
. 2007-06-12 22:38:04.015 Closing connection.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
What does not work particularly?
BTw, there's missing direction parameter in synchronize command. Syntax is:
Code:
synchronize local|remote|both [ <local directory> [ <remote directory> ] ]
rej
[View user's profile]

Joined: 2007-06-12
Posts: 2
D'oh - I omitted the parameter. I shall go and beat myself with a large stick. Or blame it on cmd's horrible cut and paste.
Apologies.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License