synchronize both issue

Advertisement

irbeaney
Joined:
Posts:
1
Location:
Dartford, UK

synchronize both issue

Hi.

I'm trying to synchronise using the "synchronize both [local] [remote]" command. In the example I have a root directory and 2 subdirectories on the local (Windows 2008 server) and remote (Unix AIX) machines.

The first time I run the script, the directory structure and files are synchronised perfectly.

local machine
root -> Dir1/a_file
-> Dir2/

remote machine
root -> Dir1/a_file
-> Dir2/

If however I move the file on either server to the other directory (move Dir1/a_file to Dir2) and then re-run the script, I get the file appearing in both directories on both servers.

What am I doing wrong?



Regards,
Ian

Batch File
~~~~~~~~~~

winscp.exe /console /log=Sync.log /script="C:\Program Files (x86)\WinSCP\sync.txt" /parameter "D:\sftproot\StanhopeTest\" "/u7/FTP-Transport/StanhopeTest/"


Synchronisation Script
~~~~~~~~~~~~~~~~~~~~~~
option batch abort
option confirm off
open root@10.1.0.10

synchronize both "%1%" "%2%"

exit


Log Details
~~~~~~~~~~~

. 2012-02-02 09:35:05.046 --------------------------------------------------------------------------
. 2012-02-02 09:35:05.046 WinSCP Version 5.0.5 (Build 1782) (OS 6.1.7601 Service Pack 1)
. 2012-02-02 09:35:05.046 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2012-02-02 09:35:05.062 Local account: DMZ-H2\Administrator
. 2012-02-02 09:35:05.062 Login time: 02 February 2012 09:35:05
. 2012-02-02 09:35:05.062 --------------------------------------------------------------------------
. 2012-02-02 09:35:05.062 Session name: root@10.1.0.10 (Stored session)
. 2012-02-02 09:35:05.062 Host name: 10.1.0.10 (Port: 21)
. 2012-02-02 09:35:05.062 User name: root (Password: Yes, Key file: No)
. 2012-02-02 09:35:05.062 Tunnel: No
. 2012-02-02 09:35:05.062 Transfer Protocol: FTP
. 2012-02-02 09:35:05.062 Ping type: C, Ping interval: 30 sec; Timeout: 45 sec
. 2012-02-02 09:35:05.062 Proxy: none
. 2012-02-02 09:35:05.062 FTP: FTPS: None; Passive: Yes [Force IP: No]
. 2012-02-02 09:35:05.062 Local directory: D:\sftproot, Remote directory: /u7/FTP-Transport, Update: No, Cache: Yes
. 2012-02-02 09:35:05.062 Cache directory changes: Yes, Permanent: Yes
. 2012-02-02 09:35:05.062 DST mode: 1
. 2012-02-02 09:35:05.062 --------------------------------------------------------------------------
. 2012-02-02 09:35:05.062 Connecting to 10.1.0.10 ...
. 2012-02-02 09:35:05.062 Connected with 10.1.0.10. Waiting for welcome message...
< 2012-02-02 09:35:05.093 220 moat_rs620 FTP server (Version 4.2 Wed Apr 11 11:55:13 CDT 2007) ready.
> 2012-02-02 09:35:05.093 USER root
< 2012-02-02 09:35:05.109 331 Password required for root.
> 2012-02-02 09:35:05.109 PASS *******
< 2012-02-02 09:35:05.140 230-Last unsuccessful login: Tue Jan 24 08:36:52 GMT 2012 on /dev/pts/12 from dc7700-ian.ad.moat
< 2012-02-02 09:35:05.140 230-Last login: Thu Feb 2 09:31:03 GMT 2012 on ftp from ::ffff:192.168.150.147
< 2012-02-02 09:35:05.234 230 User root logged in.
> 2012-02-02 09:35:05.234 SYST
< 2012-02-02 09:35:05.234 215 UNIX Type: L8 Version: BSD-44
> 2012-02-02 09:35:05.234 FEAT
< 2012-02-02 09:35:05.234 500 'FEAT': command not understood.
. 2012-02-02 09:35:05.234 Connected
. 2012-02-02 09:35:05.234 Got reply 1 to the command 1
. 2012-02-02 09:35:05.234 --------------------------------------------------------------------------
. 2012-02-02 09:35:05.234 Using FTP protocol.
. 2012-02-02 09:35:05.234 Doing startup conversation with host.
> 2012-02-02 09:35:05.234 PWD
< 2012-02-02 09:35:05.296 257 "/" is current directory.
. 2012-02-02 09:35:05.296 Got reply 1 to the command 16
. 2012-02-02 09:35:05.296 Changing directory to "/u7/FTP-Transport".
> 2012-02-02 09:35:05.296 CWD /u7/FTP-Transport
< 2012-02-02 09:35:05.328 250 CWD command successful.
. 2012-02-02 09:35:05.328 Got reply 1 to the command 16
. 2012-02-02 09:35:05.328 Getting current directory name.
> 2012-02-02 09:35:05.328 PWD
< 2012-02-02 09:35:05.343 257 "/u7/FTP-Transport" is current directory.
. 2012-02-02 09:35:05.343 Got reply 1 to the command 16
. 2012-02-02 09:35:05.343 Startup conversation with host finished.
< 2012-02-02 09:35:05.343 Script: Active session: [1] root@10.1.0.10
. 2012-02-02 09:35:05.343 Session upkeep
. 2012-02-02 09:35:05.343 Session upkeep
> 2012-02-02 09:35:05.343 Script: synchronize both "D:\sftproot\StanhopeTest\" "/u7/FTP-Transport/StanhopeTest/"
< 2012-02-02 09:35:05.343 Script: Comparing...
. 2012-02-02 09:35:05.343 Collecting synchronization list for local directory 'D:\sftproot\StanhopeTest\' and remote directory '/u7/FTP-Transport/StanhopeTest/', mode = 2, params = 2
. 2012-02-02 09:35:05.343 Retrieving directory listing...
> 2012-02-02 09:35:05.343 CWD /u7/FTP-Transport/StanhopeTest/
< 2012-02-02 09:35:05.359 250 CWD command successful.
> 2012-02-02 09:35:05.359 PWD
< 2012-02-02 09:35:05.359 257 "/u7/FTP-Transport/StanhopeTest" is current directory.
> 2012-02-02 09:35:05.359 TYPE A
< 2012-02-02 09:35:05.359 200 Type set to A; form set to N.
> 2012-02-02 09:35:05.375 PASV
< 2012-02-02 09:35:05.375 227 Entering Passive Mode (10,1,0,10,128,52)
> 2012-02-02 09:35:05.375 LIST -a
< 2012-02-02 09:35:05.406 150 Opening data connection for /bin/ls.
< 2012-02-02 09:35:05.406 226 Transfer complete.
. 2012-02-02 09:35:05.406 total 48
. 2012-02-02 09:35:05.406 drwxrwsrwx 4 ianbeane sys 11264 Feb 02 09:22 .
. 2012-02-02 09:35:05.406 drwxrwsrwx 12 root sys 1536 Feb 01 14:48 ..
. 2012-02-02 09:35:05.406 drwxrwsrwx 2 ianbeane sys 512 Feb 02 09:34 Dir1
. 2012-02-02 09:35:05.406 drwxrwsrwx 2 ianbeane sys 512 Feb 02 09:33 Dir2
. 2012-02-02 09:35:05.406 Directory listing successful
. 2012-02-02 09:35:05.406 Got reply 1 to the command 2
. 2012-02-02 09:35:05.406 Collecting synchronization list for local directory 'D:\sftproot\StanhopeTest\Dir1' and remote directory '/u7/FTP-Transport/StanhopeTest/Dir1', mode = 2, params = 2
. 2012-02-02 09:35:05.406 Retrieving directory listing...
> 2012-02-02 09:35:05.406 CWD /u7/FTP-Transport/StanhopeTest/Dir1/
< 2012-02-02 09:35:05.421 250 CWD command successful.
> 2012-02-02 09:35:05.421 PWD
< 2012-02-02 09:35:05.437 257 "/u7/FTP-Transport/StanhopeTest/Dir1" is current directory.
> 2012-02-02 09:35:05.437 TYPE A
< 2012-02-02 09:35:05.453 200 Type set to A; form set to N.
> 2012-02-02 09:35:05.453 PASV
< 2012-02-02 09:35:05.453 227 Entering Passive Mode (10,1,0,10,128,53)
> 2012-02-02 09:35:05.453 LIST -a
< 2012-02-02 09:35:05.484 150 Opening data connection for /bin/ls.
< 2012-02-02 09:35:05.484 226 Transfer complete.
. 2012-02-02 09:35:05.484 total 40
. 2012-02-02 09:35:05.484 drwxrwsrwx 2 ianbeane sys 512 Feb 02 09:34 .
. 2012-02-02 09:35:05.484 drwxrwsrwx 4 ianbeane sys 11264 Feb 02 09:22 ..
. 2012-02-02 09:35:05.484 -rw-rw-rw- 1 ianbeane sys 15 Feb 02 09:34 a_file
. 2012-02-02 09:35:05.484 Directory listing successful
. 2012-02-02 09:35:05.484 Got reply 1 to the command 2
. 2012-02-02 09:35:05.484 Collecting synchronization list for local directory 'D:\sftproot\StanhopeTest\Dir2' and remote directory '/u7/FTP-Transport/StanhopeTest/Dir2', mode = 2, params = 2
. 2012-02-02 09:35:05.484 Retrieving directory listing...
> 2012-02-02 09:35:05.484 CWD /u7/FTP-Transport/StanhopeTest/Dir2/
< 2012-02-02 09:35:05.500 250 CWD command successful.
> 2012-02-02 09:35:05.500 PWD
< 2012-02-02 09:35:05.515 257 "/u7/FTP-Transport/StanhopeTest/Dir2" is current directory.
> 2012-02-02 09:35:05.515 TYPE A
< 2012-02-02 09:35:05.515 200 Type set to A; form set to N.
> 2012-02-02 09:35:05.515 PASV
< 2012-02-02 09:35:05.515 227 Entering Passive Mode (10,1,0,10,128,54)
> 2012-02-02 09:35:05.515 LIST -a
< 2012-02-02 09:35:05.546 150 Opening data connection for /bin/ls.
< 2012-02-02 09:35:05.546 226 Transfer complete.
. 2012-02-02 09:35:05.546 total 32
. 2012-02-02 09:35:05.546 drwxrwsrwx 2 ianbeane sys 512 Feb 02 09:33 .
. 2012-02-02 09:35:05.546 drwxrwsrwx 4 ianbeane sys 11264 Feb 02 09:22 ..
. 2012-02-02 09:35:05.546 Directory listing successful
. 2012-02-02 09:35:05.546 Got reply 1 to the command 2
< 2012-02-02 09:35:05.546 Script: Synchronizing...
. 2012-02-02 09:35:05.546 Synchronizing local directory 'D:\sftproot\StanhopeTest\Dir1\' with remote directory '/u7/FTP-Transport/StanhopeTest/Dir1/', params = 2
. 2012-02-02 09:35:05.546 File: "/u7/FTP-Transport/StanhopeTest/Dir1/a_file"
< 2012-02-02 09:35:05.546 Script: Local 'D:\sftproot\StanhopeTest\Dir1' <=> Remote '/u7/FTP-Transport/StanhopeTest/Dir1'
. 2012-02-02 09:35:05.546 Copying "/u7/FTP-Transport/StanhopeTest/Dir1/a_file" to local directory started.
. 2012-02-02 09:35:05.546 Binary transfer mode selected.
. 2012-02-02 09:35:05.546 Starting download of /u7/FTP-Transport/StanhopeTest/Dir1/a_file
> 2012-02-02 09:35:05.546 CWD /u7/FTP-Transport/StanhopeTest/Dir1/
< 2012-02-02 09:35:05.546 250 CWD command successful.
> 2012-02-02 09:35:05.546 PWD
< 2012-02-02 09:35:05.562 257 "/u7/FTP-Transport/StanhopeTest/Dir1" is current directory.
> 2012-02-02 09:35:05.562 TYPE A
< 2012-02-02 09:35:05.562 200 Type set to A; form set to N.
> 2012-02-02 09:35:05.562 PASV
< 2012-02-02 09:35:05.593 227 Entering Passive Mode (10,1,0,10,128,55)
> 2012-02-02 09:35:05.593 LIST -a
< 2012-02-02 09:35:08.609 150 Opening data connection for /bin/ls.
< 2012-02-02 09:35:08.609 226 Transfer complete.
. 2012-02-02 09:35:08.609 total 40
. 2012-02-02 09:35:08.609 drwxrwsrwx 2 ianbeane sys 512 Feb 02 09:34 .
. 2012-02-02 09:35:08.609 drwxrwsrwx 4 ianbeane sys 11264 Feb 02 09:22 ..
. 2012-02-02 09:35:08.609 -rw-rw-rw- 1 ianbeane sys 15 Feb 02 09:34 a_file
> 2012-02-02 09:35:08.609 TYPE I
< 2012-02-02 09:35:08.609 200 Type set to I.
> 2012-02-02 09:35:08.609 PASV
< 2012-02-02 09:35:08.609 227 Entering Passive Mode (10,1,0,10,128,59)
> 2012-02-02 09:35:08.625 RETR a_file
< 2012-02-02 09:35:08.625 150 Opening data connection for a_file (15 bytes).
< 2012-02-02 09:35:08.625 226 Transfer complete.
. 2012-02-02 09:35:08.625 Download successful
. 2012-02-02 09:35:08.625 Got reply 1 to the command 4
. 2012-02-02 09:35:08.625 Session upkeep
. 2012-02-02 09:35:08.625 Session upkeep
> 2012-02-02 09:35:08.625 Script: exit
. 2012-02-02 09:35:08.625 Session upkeep
. 2012-02-02 09:35:08.625 Got reply 1004 to the command 4
. 2012-02-02 09:35:08.625 Disconnected from server

. 2012-02-02 09:35:25.140 --------------------------------------------------------------------------
. 2012-02-02 09:35:25.140 WinSCP Version 5.0.5 (Build 1782) (OS 6.1.7601 Service Pack 1)
. 2012-02-02 09:35:25.140 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2012-02-02 09:35:25.140 Local account: DMZ-H2\Administrator
. 2012-02-02 09:35:25.140 Login time: 02 February 2012 09:35:25
. 2012-02-02 09:35:25.140 --------------------------------------------------------------------------
. 2012-02-02 09:35:25.140 Session name: root@10.1.0.10 (Stored session)
. 2012-02-02 09:35:25.140 Host name: 10.1.0.10 (Port: 21)
. 2012-02-02 09:35:25.140 User name: root (Password: Yes, Key file: No)
. 2012-02-02 09:35:25.140 Tunnel: No
. 2012-02-02 09:35:25.140 Transfer Protocol: FTP
. 2012-02-02 09:35:25.140 Ping type: C, Ping interval: 30 sec; Timeout: 45 sec
. 2012-02-02 09:35:25.140 Proxy: none
. 2012-02-02 09:35:25.140 FTP: FTPS: None; Passive: Yes [Force IP: No]
. 2012-02-02 09:35:25.140 Local directory: D:\sftproot, Remote directory: /u7/FTP-Transport, Update: No, Cache: Yes
. 2012-02-02 09:35:25.140 Cache directory changes: Yes, Permanent: Yes
. 2012-02-02 09:35:25.140 DST mode: 1
. 2012-02-02 09:35:25.140 --------------------------------------------------------------------------
. 2012-02-02 09:35:25.140 Connecting to 10.1.0.10 ...
. 2012-02-02 09:35:25.156 Connected with 10.1.0.10. Waiting for welcome message...
< 2012-02-02 09:35:25.171 220 moat_rs620 FTP server (Version 4.2 Wed Apr 11 11:55:13 CDT 2007) ready.
> 2012-02-02 09:35:25.171 USER root
< 2012-02-02 09:35:25.187 331 Password required for root.
> 2012-02-02 09:35:25.187 PASS *******
< 2012-02-02 09:35:25.187 230-Last unsuccessful login: Tue Jan 24 08:36:52 GMT 2012 on /dev/pts/12 from dc7700-ian.ad.moat
< 2012-02-02 09:35:25.187 230-Last login: Thu Feb 2 09:35:05 GMT 2012 on ftp from ::ffff:192.168.150.147
< 2012-02-02 09:35:25.250 230 User root logged in.
> 2012-02-02 09:35:25.250 SYST
< 2012-02-02 09:35:26.750 215 UNIX Type: L8 Version: BSD-44
> 2012-02-02 09:35:26.750 FEAT
< 2012-02-02 09:35:26.765 500 'FEAT': command not understood.
. 2012-02-02 09:35:26.765 Connected
. 2012-02-02 09:35:26.765 Got reply 1 to the command 1
. 2012-02-02 09:35:26.765 --------------------------------------------------------------------------
. 2012-02-02 09:35:26.765 Using FTP protocol.
. 2012-02-02 09:35:26.765 Doing startup conversation with host.
> 2012-02-02 09:35:26.765 PWD
< 2012-02-02 09:35:26.765 257 "/" is current directory.
. 2012-02-02 09:35:26.765 Got reply 1 to the command 16
. 2012-02-02 09:35:26.765 Changing directory to "/u7/FTP-Transport".
> 2012-02-02 09:35:26.765 CWD /u7/FTP-Transport
< 2012-02-02 09:35:26.765 250 CWD command successful.
. 2012-02-02 09:35:26.765 Got reply 1 to the command 16
. 2012-02-02 09:35:26.765 Getting current directory name.
> 2012-02-02 09:35:26.765 PWD
< 2012-02-02 09:35:26.765 257 "/u7/FTP-Transport" is current directory.
. 2012-02-02 09:35:26.765 Got reply 1 to the command 16
. 2012-02-02 09:35:26.765 Startup conversation with host finished.
< 2012-02-02 09:35:26.765 Script: Active session: [1] root@10.1.0.10
. 2012-02-02 09:35:26.765 Session upkeep
. 2012-02-02 09:35:26.765 Session upkeep
> 2012-02-02 09:35:26.765 Script: synchronize both "D:\sftproot\StanhopeTest\" "/u7/FTP-Transport/StanhopeTest/"
< 2012-02-02 09:35:26.765 Script: Comparing...
. 2012-02-02 09:35:26.765 Collecting synchronization list for local directory 'D:\sftproot\StanhopeTest\' and remote directory '/u7/FTP-Transport/StanhopeTest/', mode = 2, params = 2
. 2012-02-02 09:35:26.765 Retrieving directory listing...
> 2012-02-02 09:35:26.765 CWD /u7/FTP-Transport/StanhopeTest/
< 2012-02-02 09:35:26.765 250 CWD command successful.
> 2012-02-02 09:35:26.765 PWD
< 2012-02-02 09:35:26.781 257 "/u7/FTP-Transport/StanhopeTest" is current directory.
> 2012-02-02 09:35:26.781 TYPE A
< 2012-02-02 09:35:26.781 200 Type set to A; form set to N.
> 2012-02-02 09:35:26.781 PASV
< 2012-02-02 09:35:26.781 227 Entering Passive Mode (10,1,0,10,128,64)
> 2012-02-02 09:35:26.781 LIST -a
< 2012-02-02 09:35:26.781 150 Opening data connection for /bin/ls.
< 2012-02-02 09:35:26.812 226 Transfer complete.
. 2012-02-02 09:35:26.812 total 48
. 2012-02-02 09:35:26.812 drwxrwsrwx 4 ianbeane sys 11264 Feb 02 09:22 .
. 2012-02-02 09:35:26.812 drwxrwsrwx 12 root sys 1536 Feb 01 14:48 ..
. 2012-02-02 09:35:26.812 drwxrwsrwx 2 ianbeane sys 512 Feb 02 09:35 Dir1
. 2012-02-02 09:35:26.812 drwxrwsrwx 2 ianbeane sys 512 Feb 02 09:35 Dir2
. 2012-02-02 09:35:26.812 Directory listing successful
. 2012-02-02 09:35:26.812 Got reply 1 to the command 2
. 2012-02-02 09:35:26.812 Collecting synchronization list for local directory 'D:\sftproot\StanhopeTest\Dir1' and remote directory '/u7/FTP-Transport/StanhopeTest/Dir1', mode = 2, params = 2
. 2012-02-02 09:35:26.812 Retrieving directory listing...
> 2012-02-02 09:35:26.812 CWD /u7/FTP-Transport/StanhopeTest/Dir1/
< 2012-02-02 09:35:26.828 250 CWD command successful.
> 2012-02-02 09:35:26.828 PWD
< 2012-02-02 09:35:26.828 257 "/u7/FTP-Transport/StanhopeTest/Dir1" is current directory.
> 2012-02-02 09:35:26.828 TYPE A
< 2012-02-02 09:35:26.828 200 Type set to A; form set to N.
> 2012-02-02 09:35:26.828 PASV
< 2012-02-02 09:35:26.828 227 Entering Passive Mode (10,1,0,10,128,65)
> 2012-02-02 09:35:26.828 LIST -a
< 2012-02-02 09:35:26.843 150 Opening data connection for /bin/ls.
< 2012-02-02 09:35:26.859 226 Transfer complete.
. 2012-02-02 09:35:26.859 total 32
. 2012-02-02 09:35:26.859 drwxrwsrwx 2 ianbeane sys 512 Feb 02 09:35 .
. 2012-02-02 09:35:26.859 drwxrwsrwx 4 ianbeane sys 11264 Feb 02 09:22 ..
. 2012-02-02 09:35:26.859 Directory listing successful
. 2012-02-02 09:35:26.859 Got reply 1 to the command 2
. 2012-02-02 09:35:26.859 Collecting synchronization list for local directory 'D:\sftproot\StanhopeTest\Dir2' and remote directory '/u7/FTP-Transport/StanhopeTest/Dir2', mode = 2, params = 2
. 2012-02-02 09:35:26.859 Retrieving directory listing...
> 2012-02-02 09:35:26.859 CWD /u7/FTP-Transport/StanhopeTest/Dir2/
< 2012-02-02 09:35:26.859 250 CWD command successful.
> 2012-02-02 09:35:26.859 PWD
< 2012-02-02 09:35:26.859 257 "/u7/FTP-Transport/StanhopeTest/Dir2" is current directory.
> 2012-02-02 09:35:26.859 TYPE A
< 2012-02-02 09:35:26.875 200 Type set to A; form set to N.
> 2012-02-02 09:35:26.875 PASV
< 2012-02-02 09:35:26.875 227 Entering Passive Mode (10,1,0,10,128,66)
> 2012-02-02 09:35:26.875 LIST -a
< 2012-02-02 09:35:26.890 150 Opening data connection for /bin/ls.
< 2012-02-02 09:35:26.906 226 Transfer complete.
. 2012-02-02 09:35:26.906 total 40
. 2012-02-02 09:35:26.906 drwxrwsrwx 2 ianbeane sys 512 Feb 02 09:35 .
. 2012-02-02 09:35:26.906 drwxrwsrwx 4 ianbeane sys 11264 Feb 02 09:22 ..
. 2012-02-02 09:35:26.906 -rw-rw-rw- 1 ianbeane sys 15 Feb 02 09:34 a_file
. 2012-02-02 09:35:26.906 Directory listing successful
. 2012-02-02 09:35:26.906 Got reply 1 to the command 2
< 2012-02-02 09:35:26.906 Script: Synchronizing...
. 2012-02-02 09:35:26.906 Synchronizing local directory 'D:\sftproot\StanhopeTest\Dir1\' with remote directory '/u7/FTP-Transport/StanhopeTest/Dir1/', params = 2
. 2012-02-02 09:35:26.906 Copying 1 files/directories to remote directory "/u7/FTP-Transport/StanhopeTest/Dir1/"
. 2012-02-02 09:35:26.906 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 01; Resume: S (102400); CalcS: No; Mask: *.*
. 2012-02-02 09:35:26.906 TM: M; ClAr: No; CPS: 0; ExclM(No):
. 2012-02-02 09:35:26.906 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2012-02-02 09:35:26.906 File: "D:\sftproot\StanhopeTest\Dir1\a_file"
< 2012-02-02 09:35:26.906 Script: Local 'D:\sftproot\StanhopeTest\Dir1' <=> Remote '/u7/FTP-Transport/StanhopeTest/Dir1'
. 2012-02-02 09:35:26.906 Copying "D:\sftproot\StanhopeTest\Dir1\a_file" to remote directory started.
. 2012-02-02 09:35:26.906 Binary transfer mode selected.
. 2012-02-02 09:35:26.906 Starting upload of D:\sftproot\StanhopeTest\Dir1\a_file
> 2012-02-02 09:35:26.906 CWD /u7/FTP-Transport/StanhopeTest/Dir1/
< 2012-02-02 09:35:26.906 250 CWD command successful.
> 2012-02-02 09:35:26.906 PWD
< 2012-02-02 09:35:26.906 257 "/u7/FTP-Transport/StanhopeTest/Dir1" is current directory.
> 2012-02-02 09:35:26.906 TYPE A
< 2012-02-02 09:35:26.906 200 Type set to A; form set to N.
> 2012-02-02 09:35:26.906 PASV
< 2012-02-02 09:35:26.921 227 Entering Passive Mode (10,1,0,10,128,67)
> 2012-02-02 09:35:26.921 LIST -a
< 2012-02-02 09:35:26.921 150 Opening data connection for /bin/ls.
< 2012-02-02 09:35:26.937 226 Transfer complete.
. 2012-02-02 09:35:26.937 total 32
. 2012-02-02 09:35:26.937 drwxrwsrwx 2 ianbeane sys 512 Feb 02 09:35 .
. 2012-02-02 09:35:26.937 drwxrwsrwx 4 ianbeane sys 11264 Feb 02 09:22 ..
> 2012-02-02 09:35:26.937 TYPE I
< 2012-02-02 09:35:26.953 200 Type set to I.
> 2012-02-02 09:35:26.953 PASV
< 2012-02-02 09:35:26.953 227 Entering Passive Mode (10,1,0,10,128,68)
> 2012-02-02 09:35:26.953 STOR a_file
< 2012-02-02 09:35:26.953 150 Opening data connection for a_file.
< 2012-02-02 09:35:26.953 226 Transfer complete.
. 2012-02-02 09:35:26.953 Upload successful
. 2012-02-02 09:35:26.953 Got reply 1 to the command 4
. 2012-02-02 09:35:26.953 Synchronizing local directory 'D:\sftproot\StanhopeTest\Dir2\' with remote directory '/u7/FTP-Transport/StanhopeTest/Dir2/', params = 2
. 2012-02-02 09:35:26.953 File: "/u7/FTP-Transport/StanhopeTest/Dir2/a_file"
< 2012-02-02 09:35:26.953 Script: Local 'D:\sftproot\StanhopeTest\Dir2' <=> Remote '/u7/FTP-Transport/StanhopeTest/Dir2'
. 2012-02-02 09:35:26.953 Copying "/u7/FTP-Transport/StanhopeTest/Dir2/a_file" to local directory started.
. 2012-02-02 09:35:26.953 Binary transfer mode selected.
. 2012-02-02 09:35:26.953 Starting download of /u7/FTP-Transport/StanhopeTest/Dir2/a_file
> 2012-02-02 09:35:26.953 CWD /u7/FTP-Transport/StanhopeTest/Dir2/
< 2012-02-02 09:35:26.953 250 CWD command successful.
> 2012-02-02 09:35:26.953 PWD
< 2012-02-02 09:35:26.968 257 "/u7/FTP-Transport/StanhopeTest/Dir2" is current directory.
> 2012-02-02 09:35:26.968 TYPE A
< 2012-02-02 09:35:26.968 200 Type set to A; form set to N.
> 2012-02-02 09:35:26.968 PASV
< 2012-02-02 09:35:26.968 227 Entering Passive Mode (10,1,0,10,128,69)
> 2012-02-02 09:35:26.968 LIST -a
< 2012-02-02 09:35:26.984 150 Opening data connection for /bin/ls.
< 2012-02-02 09:35:27.000 226 Transfer complete.
. 2012-02-02 09:35:27.000 total 40
. 2012-02-02 09:35:27.000 drwxrwsrwx 2 ianbeane sys 512 Feb 02 09:35 .
. 2012-02-02 09:35:27.000 drwxrwsrwx 4 ianbeane sys 11264 Feb 02 09:22 ..
. 2012-02-02 09:35:27.000 -rw-rw-rw- 1 ianbeane sys 15 Feb 02 09:34 a_file
> 2012-02-02 09:35:27.000 TYPE I
< 2012-02-02 09:35:27.000 200 Type set to I.
> 2012-02-02 09:35:27.000 PASV
< 2012-02-02 09:35:27.000 227 Entering Passive Mode (10,1,0,10,128,70)
> 2012-02-02 09:35:27.000 RETR a_file
< 2012-02-02 09:35:27.015 150 Opening data connection for a_file (15 bytes).
< 2012-02-02 09:35:27.015 226 Transfer complete.
. 2012-02-02 09:35:27.015 Download successful
. 2012-02-02 09:35:27.015 Got reply 1 to the command 4
. 2012-02-02 09:35:27.015 Session upkeep
. 2012-02-02 09:35:27.015 Session upkeep
> 2012-02-02 09:35:27.015 Script: exit
. 2012-02-02 09:35:27.015 Session upkeep
. 2012-02-02 09:35:27.015 Got reply 1004 to the command 4
. 2012-02-02 09:35:27.015 Disconnected from server

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: synchronize both issue

irbeaney wrote:

If however I move the file on either server to the other directory (move Dir1/a_file to Dir2) and then re-run the script, I get the file appearing in both directories on both servers.
That's actually what it should do.

Please read:
https://winscp.net/eng/docs/task_synchronize_full#mode

In both mode when the file is present on on side, but absent on the other, WinSCP always copies the file, never deletes. Actually in both mode WinSCP never deletes.

Reply with quote

Advertisement

You can post new topics in this forum