synchronize script reports

Advertisement

em1239
Guest

synchronize script reports

I am unable to synchronize my files via the command line interface, but gui works fine.

I've provided both the sequence that I used for the gui that worked, and the setup that I used for the command line interface that didnt work. I'm using the same local machine and user, as well as the same remote machine and remote user login. I'm using the same configuration for both as well.

Directory contents of both local and remote before:
C:\sync_test\windows.txt
/sync_test/linux.txt

1. WinSCP
  Login (dialog)
    File protocol -> SCP

    Directories:
      Remote directory: C:\sync_test\
      Local directory: /sync_test/

    Note:Everything else left as default

    Save, Name: test
    Login

  Synchronize    

2. Synchornize (dialog):
  Local directory:
  C:\sync_test

  Remote directory:
  /home/username/sync_test

  Direction/Target directory:
  Both

  Mode:
  Synchronize files

  Synchronize options:
  Existing files only - checked
  Preview changes - checked

  Transfer settings:
  Transfer type: Binary
  Note: all of these transfer settings I've left default.

  OK    

3. Synchronization checklist (dialog)
  Check All
  OK    

Directory contents of both local and remote after:
C:\sync_test\windows.txt
C:\sync_test\linux.txt
/sync_test/windows.txt
/sync_test/linux.txt


=====================================================

Directory contents of both local and remote before:
C:\sync_test\windows.txt
/sync_test/linux.txt

0. Start -> Run -> cmd
  C:\>cd "Program Files (x86)\WinSCP"
  C:\Program Files (x86)\WinSCP>WinSCP.com /log=C:\winscp.log    

1. WinSCP.com terminal:
  open test
  
  pwd
    /sync_test

  synchronize both
    Using configured synchronization options different from factory defaults.
    Comparing...
    Local 'C:\sync_test' <=> Remote '/sync_test'
    Nothing to synchronize.

  exit    

Directory contents of both local and remote after:
C:\sync_test\windows.txt
/sync_test/linux.txt


Relevant section of log:
> 2016-05-19 14:12:50.243 Script: synchronize both
< 2016-05-19 14:12:50.243 Script: Using configured synchronization options different from factory defaults.
< 2016-05-19 14:12:50.243 Script: Comparing...
. 2016-05-19 14:12:50.243 Collecting synchronization list for local directory 'C:\sync_test' and remote directory '/sync_test', mode = Both, params = 0x6 (NoConfirmation, ExistingOnly)
. 2016-05-19 14:12:50.243 Local file 'C:\sync_test\.' [2016-05-19T20:58:50.823Z] [0] excluded from synchronization
. 2016-05-19 14:12:50.243 Local file 'C:\sync_test\..' [2016-05-19T20:58:50.823Z] [0] excluded from synchronization
. 2016-05-19 14:12:50.243 Local file 'C:\sync_test\windows.txt' [2016-05-19T20:40:29.955Z] [7] included to synchronization
. 2016-05-19 14:12:50.243 Listing current directory.
> 2016-05-19 14:12:50.243 ls -la --full-time ; echo "WinSCP: this is end-of-file:$status"
< 2016-05-19 14:12:50.243 total 52
< 2016-05-19 14:12:50.243 drwxrwxr-x  2 username users  4096 2016-05-19 13:58:58.525451000 -0700 .
< 2016-05-19 14:12:50.243 drwxr-xr-x 81 username users 45056 2016-05-19 13:42:31.164937000 -0700 ..
< 2016-05-19 14:12:50.243 -rw-rw-r--  1 username users     6 2016-05-19 13:41:09.135575000 -0700 linux.txt
< 2016-05-19 14:12:50.243 WinSCP: this is end-of-file:0
. 2016-05-19 14:12:50.243 Directory listing with --full-time succeed, next time all errors during directory listing will be displayed immediately.
. 2016-05-19 14:12:50.243 .;d;0;2016-05-19T20:58:58.000Z;"username" [0];"users" [0];rwxrwxr-x;2
. 2016-05-19 14:12:50.243 ..;d;0;2016-05-19T20:42:31.000Z;"username" [0];"users" [0];rwxr-xr-x;0
. 2016-05-19 14:12:50.243 linux.txt;-;6;2016-05-19T20:41:09.000Z;"username" [0];"users" [0];rw-rw-r--;0
. 2016-05-19 14:12:50.275 Remote file '/sync_test/linux.txt' [2016-05-19T20:41:09.000Z] [6] is new
. 2016-05-19 14:12:50.275 Local file 'C:\sync_test\windows.txt' [2016-05-19T20:40:29.955Z] [7] is new
< 2016-05-19 14:12:50.275 Script: Nothing to synchronize.    

Using WinSCP version 5.7.7 (Build 6257)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: synchronize script reports

You have selected "Existing files only" option. But there are no files with the same name (=existing files) in the local and remote directories. So there's nothing to be synchronized. That's why no file was (probably) selected on the Synchronization checklist dialog. But you overrode that by clicking Check all. So why are you selecting the "Existing files only", if you do not want the option?

Also you must have selected Use same options next time. And because you do not isolate the script run from GUI configuration (what is not recommended), the script also uses "Existing files only". Hence it also does not synchronize any files.

Reply with quote

Advertisement

You can post new topics in this forum