Synchronize remote -mirror -filemask: excluding multiple remote directories, one which has a space

Advertisement

BlueToast
Joined:
Posts:
5

Synchronize remote -mirror -filemask: excluding multiple remote directories, one which has a space

This is the command I am having difficulty with (logs confirm):
"C:\Program Files (x86)\WinSCP\winscp.exe" "My%20Saved%20Session" /loglevel=1 /log="C:\temp\test.log" /command "synchronize remote -mirror -criteria=time -filemask="^|*/$RECYCLE.BIN/^;*/System Volume Information/^" "C:\temp\MDTDrive" "/""
This command works (logs confirm):
"C:\Program Files (x86)\WinSCP\winscp.exe" "My%20Saved%20Session" /loglevel=1 /log="C:\temp\test.log" /command "synchronize remote -mirror -criteria=time -filemask="^|*/$RECYCLE.BIN/^" "C:\temp\MDTDrive" "/""
Problem:
For the life of me I am unable to get /System Volume Information/ (remote system, the FTP server) excluded. The logs always indicates Volume is a command (WinSCP is evidently only parsing /System, then the space between System and Volume breaks it).

Logs:
> 2018-09-28 23:29:09.582 Script: Volume
< 2018-09-28 23:29:09.582 Script: Unknown command 'Volume'.
. 2018-09-28 23:29:09.582 Script: Failed
Objective:
Both remote folders /$RECYCLE.BIN/ and /System Volume Information/ need to be EXCLUDED from file analysis on the remote server. I want to add the -delete parameter, but right now if I do WinSCP will attempt to delete these folders.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

Re: synchronize remote -mirror -filemask: excluding multiple remote directories, one which has a space

"C:\Program Files (x86)\WinSCP\winscp.exe" "My%20Saved%20Session" /loglevel=1 /log="C:\temp\test.log" /command "synchronize remote -mirror -criteria=time -filemask=""^|*/$RECYCLE.BIN/^;*/System Volume Information/^"" C:\temp\MDTDrive /"
See https://winscp.net/eng/docs/commandline#syntax

(note that your supposedly working command has the quotes wrong too)

Reply with quote

BlueToast
Joined:
Posts:
5

Executed:
"C:\Program Files (x86)\WinSCP\winscp.exe" "VendorCompanyInc%20MDT%20FTP" /loglevel=1 /log="C:\temp\test.log" /command "synchronize remote -mirror -criteria=time -filemask=""^|*/$RECYCLE.BIN/^;*/System Volume Information/^"" C:\temp\MDTDrive /"
Log:
. 2018-10-02 17:42:04.628 --------------------------------------------------------------------------
. 2018-10-02 17:42:04.628 WinSCP Version 5.13.4 (Build 8731) (OS 10.0.17134 - Windows 10 Enterprise)
. 2018-10-02 17:42:04.628 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
. 2018-10-02 17:42:04.628 Log level: Debug 1
. 2018-10-02 17:42:04.628 Local account: USERDOMAIN\jdoe
. 2018-10-02 17:42:04.628 Working directory: C:\WINDOWS\system32
. 2018-10-02 17:42:04.628 Process ID: 10864
. 2018-10-02 17:42:04.629 Command-line: "C:\Program Files (x86)\WinSCP\winscp.exe"  "VendorCompanyInc%20MDT%20FTP" /loglevel=1 /log="C:\temp\test.log" /command "synchronize remote -mirror -criteria=time -filemask=""^|*/$RECYCLE.BIN/^;*/System Volume Information/^"" C:\temp\MDTDrive /"
. 2018-10-02 17:42:04.629 Parameter: VendorCompanyInc%20MDT%20FTP
. 2018-10-02 17:42:04.629 Switch:    /loglevel=1
. 2018-10-02 17:42:04.629 Switch:    /log=C:\temp\test.log
. 2018-10-02 17:42:04.629 Switch:    /command
. 2018-10-02 17:42:04.629 Parameter: synchronize remote -mirror -criteria=time -filemask="^|*/$RECYCLE.BIN/^;*/System Volume Information/^" C:\temp\MDTDrive /
. 2018-10-02 17:42:04.629 Time zone: Current: GMT-5, Standard: GMT-6 (Central Standard Time), DST: GMT-5 (Central Daylight Time), DST Start: 3/11/2018, DST End: 11/4/2018
. 2018-10-02 17:42:04.629 Login time: Tuesday, October 2, 2018 5:42:04 PM
. 2018-10-02 17:42:04.629 --------------------------------------------------------------------------
. 2018-10-02 17:42:04.629 Script: Retrospectively logging previous script records:
< 2018-10-02 17:42:04.629 Script: Opening session using command-line parameter in scripting is deprecated. Use 'open' command instead.
< 2018-10-02 17:42:04.629 Script: In scripting you should not rely on saved sites, use this command instead:
< 2018-10-02 17:42:04.629 Script: open ftpes://USERDOMAIN:***@192.168.15.10/ -certificate="3e:d5:cf:67:87:80:26:af:e5:67:6b:72:36:f4:3a:0a:22:10:41:a0"
. 2018-10-02 17:42:04.629 --------------------------------------------------------------------------
. 2018-10-02 17:42:04.629 Session name: VendorCompanyInc MDT FTP (Site)
. 2018-10-02 17:42:04.629 Host name: 192.168.15.10 (Port: 21)
. 2018-10-02 17:42:04.629 User name: USERDOMAIN (Password: Yes, Key file: No, Passphrase: No)
. 2018-10-02 17:42:04.629 Transfer Protocol: FTP
. 2018-10-02 17:42:04.629 Ping type: Dummy, Ping interval: 30 sec; Timeout: 15 sec
. 2018-10-02 17:42:04.629 Disable Nagle: No
. 2018-10-02 17:42:04.629 Proxy: None
. 2018-10-02 17:42:04.629 Send buffer: 262144
. 2018-10-02 17:42:04.629 UTF: Auto
. 2018-10-02 17:42:04.629 FTPS: Explicit TLS/SSL [Client certificate: No]
. 2018-10-02 17:42:04.629 FTP: Passive: Yes [Force IP: Auto]; MLSD: Auto [List all: Auto]; HOST: Auto
. 2018-10-02 17:42:04.629 Session reuse: Yes
. 2018-10-02 17:42:04.629 TLS/SSL versions: TLSv1.0-TLSv1.2
. 2018-10-02 17:42:04.629 Local directory: C:\Users\jdoe\Work Folders\Documents, Remote directory: /, Update: Yes, Cache: Yes
. 2018-10-02 17:42:04.629 Cache directory changes: Yes, Permanent: Yes
. 2018-10-02 17:42:04.629 Recycle bin: Delete to: No, Overwritten to: No, Bin path: 
. 2018-10-02 17:42:04.629 Timezone offset: 0h 0m
. 2018-10-02 17:42:04.629 --------------------------------------------------------------------------
. 2018-10-02 17:42:04.633 Connecting to 192.168.15.10 ...
. 2018-10-02 17:42:04.660 Connected with 192.168.15.10, negotiating TLS connection...
< 2018-10-02 17:42:04.661 220 Microsoft FTP Service
> 2018-10-02 17:42:04.661 AUTH TLS
< 2018-10-02 17:42:04.661 234 AUTH command ok. Expecting TLS Negotiation.
. 2018-10-02 17:42:04.982 Verifying certificate for "" with fingerprint 3e:d5:cf:67:87:80:26:af:e5:67:6b:72:36:f4:3a:0a:22:10:41:a0 and 20 failures
. 2018-10-02 17:42:04.982 Certificate for "" matches cached fingerprint and failures
. 2018-10-02 17:42:04.982 Using TLSv1.2, cipher TLSv1/SSLv3: ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA, ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(256) Mac=AEAD
. 2018-10-02 17:42:04.982 TLS connection established. Waiting for welcome message...
> 2018-10-02 17:42:04.982 USER USERDOMAIN
< 2018-10-02 17:42:04.983 331 Password required
> 2018-10-02 17:42:04.983 PASS ********
< 2018-10-02 17:42:04.984 230 User logged in.
> 2018-10-02 17:42:04.984 SYST
. 2018-10-02 17:42:04.985 The server is probably running Windows, assuming that directory listing timestamps are affected by DST.
< 2018-10-02 17:42:04.985 215 Windows_NT
> 2018-10-02 17:42:04.985 FEAT
< 2018-10-02 17:42:04.985 211-Extended features supported:
< 2018-10-02 17:42:04.985  LANG EN*
< 2018-10-02 17:42:04.985  UTF8
< 2018-10-02 17:42:04.985  AUTH TLS;TLS-C;SSL;TLS-P;
< 2018-10-02 17:42:04.985  PBSZ
< 2018-10-02 17:42:04.985  PROT C;P;
< 2018-10-02 17:42:04.986  CCC
< 2018-10-02 17:42:04.986  HOST
< 2018-10-02 17:42:04.986  SIZE
< 2018-10-02 17:42:04.986  MDTM
< 2018-10-02 17:42:04.986  REST STREAM
< 2018-10-02 17:42:04.986 211 END
> 2018-10-02 17:42:04.986 OPTS UTF8 ON
< 2018-10-02 17:42:04.986 200 OPTS UTF8 command successful - UTF8 encoding now ON.
> 2018-10-02 17:42:04.986 PBSZ 0
< 2018-10-02 17:42:04.988 200 PBSZ command successful.
> 2018-10-02 17:42:04.988 PROT P
< 2018-10-02 17:42:04.989 200 PROT command successful.
. 2018-10-02 17:42:04.989 Connected
. 2018-10-02 17:42:04.989 Got reply 1 to the command 1
. 2018-10-02 17:42:04.989 --------------------------------------------------------------------------
. 2018-10-02 17:42:04.989 Using FTP protocol.
. 2018-10-02 17:42:04.989 Doing startup conversation with host.
> 2018-10-02 17:42:04.989 PWD
< 2018-10-02 17:42:04.990 257 "/" is current directory.
. 2018-10-02 17:42:04.990 Got reply 1 to the command 16
. 2018-10-02 17:42:04.990 Changing directory to "/".
> 2018-10-02 17:42:04.990 CWD /
< 2018-10-02 17:42:04.991 250 CWD command successful.
. 2018-10-02 17:42:04.991 Got reply 1 to the command 16
. 2018-10-02 17:42:04.991 Getting current directory name.
> 2018-10-02 17:42:04.991 PWD
< 2018-10-02 17:42:04.991 257 "/" is current directory.
. 2018-10-02 17:42:04.992 Got reply 1 to the command 16
. 2018-10-02 17:42:04.992 Startup conversation with host finished.
< 2018-10-02 17:42:04.992 Script: Active session: [1] VendorCompanyInc MDT FTP
> 2018-10-02 17:42:04.992 Script: synchronize remote -mirror -criteria=time -filemask="^|*/$RECYCLE.BIN/^;*/System Volume Information/^" C:\temp\MDTDrive /
> 2018-10-02 17:42:04.992 Script: Parameter: remote
> 2018-10-02 17:42:04.992 Script: Switch:    -mirror
> 2018-10-02 17:42:04.992 Script: Switch:    -criteria=time
> 2018-10-02 17:42:04.992 Script: Switch:    -filemask=^|*/$RECYCLE.BIN/^;*/System Volume Information/^
> 2018-10-02 17:42:04.993 Script: Parameter: C:\temp\MDTDrive
> 2018-10-02 17:42:04.993 Script: Parameter: /
< 2018-10-02 17:42:04.993 Script: Comparing...
. 2018-10-02 17:42:04.993 Collecting synchronization list for local directory 'C:\temp\MDTDrive' and remote directory '/', mode = Remote, params = 0x1002 (NoConfirmation, Mirror), file mask = '^|*/$RECYCLE.BIN/^;*/System Volume Information/^'
. 2018-10-02 17:42:04.993 Local file 'C:\temp\MDTDrive\.' [2018-09-29T03:35:42.676Z] [0] excluded from synchronization
. 2018-10-02 17:42:04.993 Local file 'C:\temp\MDTDrive\..' [2018-09-29T03:35:42.676Z] [0] excluded from synchronization
. 2018-10-02 17:42:04.993 Local file 'C:\temp\MDTDrive\DiagnosticToolkit.7z' [2018-05-16T18:29:54.832Z] [272928] excluded from synchronization
. 2018-10-02 17:42:04.993 Retrieving directory listing...
> 2018-10-02 17:42:04.993 TYPE A
< 2018-10-02 17:42:04.994 200 Type set to A.
> 2018-10-02 17:42:04.994 PASV
< 2018-10-02 17:42:04.995 227 Entering Passive Mode (192,168,15,10,194,13).
> 2018-10-02 17:42:04.995 LIST -a
. 2018-10-02 17:42:04.995 Connecting to 192.168.15.10:49677 ...
. 2018-10-02 17:42:05.019 Session ID reused
< 2018-10-02 17:42:05.020 125 Data connection already open; Transfer starting.
. 2018-10-02 17:42:05.020 Using TLSv1.2, cipher TLSv1/SSLv3: ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA, ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(256) Mac=AEAD
. 2018-10-02 17:42:05.020 TLS connection established
. 2018-10-02 17:42:05.021 09-28-18  06:49PM       <DIR>          $RECYCLE.BIN
. 2018-10-02 17:42:05.021 12-13-17  03:42PM                49066 How-to-Uninstall-a-Program_001.png
. 2018-10-02 17:42:05.021 01-22-18  06:01PM               186378 How-to-Uninstall-a-Program_(DRAFT_v0.02.0).docx
. 2018-10-02 17:42:05.021 01-22-18  06:02PM               603157 How-to-Uninstall-a-Program_(DRAFT_v0.02.0).pdf
. 2018-10-02 17:42:05.021 02-01-18  03:55PM               187849 How-to-Uninstall-a-Program_(DRAFT_v0.03.0).docx
. 2018-10-02 17:42:05.021 02-01-18  03:55PM               673968 How-to-Uninstall-a-Program_(DRAFT_v0.03.0).pdf
. 2018-10-02 17:42:05.021 02-08-18  01:04PM               189042 How-to-Uninstall-a-Program_(DRAFT_v0.04.0).docx
. 2018-10-02 17:42:05.021 02-08-18  01:05PM               715035 How-to-Uninstall-a-Program_(DRAFT_v0.04.0).pdf
. 2018-10-02 17:42:05.021 03-02-18  01:52PM               188176 How-to-Uninstall-a-Program_(DRAFT_v0.05.0).docx
. 2018-10-02 17:42:05.022 03-02-18  01:52PM               777081 How-to-Uninstall-a-Program_(DRAFT_v0.05.0).pdf
. 2018-10-02 17:42:05.022 01-22-18  04:43PM                90330 How-to-Uninstall-a-Program_(DRAFT_v0.01.0).docx
. 2018-10-02 17:42:05.022 10-18-17  01:19PM               188733 How-to-Uninstall-a-Program2_(DRAFT_v0.01.0).docx
. 2018-10-02 17:42:05.022 09-28-18  11:11PM       <DIR>          Extensions
. 2018-10-02 17:42:05.022 08-19-18  08:13PM                37854 license.txt
. 2018-10-02 17:42:05.022 05-16-18  01:29PM               272928 DiagnosticToolkit.7z
. 2018-10-02 17:42:05.022 09-28-18  08:11PM       <DIR>          System Volume Information
. 2018-10-02 17:42:05.022 09-28-18  09:44PM                76135 unins000.dat
. 2018-10-02 17:42:05.022 09-28-18  09:43PM              1277728 unins000.exe
. 2018-10-02 17:42:05.022 09-28-18  09:44PM                22727 unins000.msg
. 2018-10-02 17:42:05.022 08-31-18  01:22PM               284496 WinSCP.com
. 2018-10-02 17:42:05.022 08-31-18  01:22PM             19324624 WinSCP.exe
. 2018-10-02 17:42:05.022 08-31-18  01:22PM             11189107 WinSCP.map
. 2018-10-02 17:42:05.022 08-31-18  01:22PM               164736 WinSCPnet.dll
. 2018-10-02 17:42:05.022 08-31-17  02:33PM               222891 _Stats.xlsx
. 2018-10-02 17:42:05.022 05-19-17  12:48PM                  165 ~$_Benchmarks.xlsx
< 2018-10-02 17:42:05.022 226 Transfer complete.
. 2018-10-02 17:42:05.022 Directory listing successful
. 2018-10-02 17:42:05.022 Got reply 1 to the command 2
. 2018-10-02 17:42:05.022 Detecting timezone difference...
. 2018-10-02 17:42:05.022 Retrieving file information...
> 2018-10-02 17:42:05.022 PWD
< 2018-10-02 17:42:05.023 257 "/" is current directory.
> 2018-10-02 17:42:05.023 CWD /How-to-Uninstall-a-Program_001.png
< 2018-10-02 17:42:05.024 550 The filename, directory name, or volume label syntax is incorrect. 
> 2018-10-02 17:42:05.024 TYPE I
< 2018-10-02 17:42:05.024 200 Type set to I.
> 2018-10-02 17:42:05.024 SIZE /How-to-Uninstall-a-Program_001.png
< 2018-10-02 17:42:05.026 213 49066
> 2018-10-02 17:42:05.026 MDTM /How-to-Uninstall-a-Program_001.png
< 2018-10-02 17:42:05.027 213 20171213204255
. 2018-10-02 17:42:05.027 Retrieving file information successful
. 2018-10-02 17:42:05.027 Got reply 1 to the command 1024
. 2018-10-02 17:42:05.027 Timezone difference of +1 detected using file /How-to-Uninstall-a-Program_001.png (Listing: 2017-12-13T21:42:00.000Z, UTC: 2017-12-13T20:42:00.000Z)
. 2018-10-02 17:42:05.027 ..;D;0;1899-12-30T06:00:00.000Z;0;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 $RECYCLE.BIN;D;0;2018-09-28T23:49:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 How-to-Uninstall-a-Program_001.png;-;49066;2017-12-13T20:42:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 How-to-Uninstall-a-Program_(DRAFT_v0.02.0).docx;-;186378;2018-01-22T23:01:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 How-to-Uninstall-a-Program_(DRAFT_v0.02.0).pdf;-;603157;2018-01-22T23:02:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 How-to-Uninstall-a-Program_(DRAFT_v0.03.0).docx;-;187849;2018-02-01T20:55:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 How-to-Uninstall-a-Program_(DRAFT_v0.03.0).pdf;-;673968;2018-02-01T20:55:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 How-to-Uninstall-a-Program_(DRAFT_v0.04.0).docx;-;189042;2018-02-08T18:04:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 How-to-Uninstall-a-Program_(DRAFT_v0.04.0).pdf;-;715035;2018-02-08T18:05:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 How-to-Uninstall-a-Program_(DRAFT_v0.05.0).docx;-;188176;2018-03-02T18:52:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 How-to-Uninstall-a-Program_(DRAFT_v0.05.0).pdf;-;777081;2018-03-02T18:52:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 How-to-Uninstall-a-Program_(DRAFT_v0.01.0).docx;-;90330;2018-01-22T21:43:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 How-to-Uninstall-a-Program2_(DRAFT_v0.01.0).docx;-;188733;2017-10-18T18:19:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 Extensions;D;0;2018-09-29T04:11:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 license.txt;-;37854;2018-08-20T01:13:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 DiagnosticToolkit.7z;-;272928;2018-05-16T18:29:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 System Volume Information;D;0;2018-09-29T01:11:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 unins000.dat;-;76135;2018-09-29T02:44:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 unins000.exe;-;1277728;2018-09-29T02:43:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 unins000.msg;-;22727;2018-09-29T02:44:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 WinSCP.com;-;284496;2018-08-31T18:22:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 WinSCP.exe;-;19324624;2018-08-31T18:22:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 WinSCP.map;-;11189107;2018-08-31T18:22:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 WinSCPnet.dll;-;164736;2018-08-31T18:22:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 _Stats.xlsx;-;222891;2017-08-31T19:33:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.027 ~$_Benchmarks.xlsx;-;165;2017-05-19T17:48:00.000Z;1;"" [0];"" [0];---------;0
. 2018-10-02 17:42:05.029 Remote file '/$RECYCLE.BIN' [2018-09-28T23:49:00.000Z] [0] is new
. 2018-10-02 17:42:05.029 Remote file '/How-to-Uninstall-a-Program_001.png' [2017-12-13T20:42:00.000Z] [49066] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/How-to-Uninstall-a-Program_(DRAFT_v0.02.0).docx' [2018-01-22T23:01:00.000Z] [186378] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/How-to-Uninstall-a-Program_(DRAFT_v0.02.0).pdf' [2018-01-22T23:02:00.000Z] [603157] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/How-to-Uninstall-a-Program_(DRAFT_v0.03.0).docx' [2018-02-01T20:55:00.000Z] [187849] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/How-to-Uninstall-a-Program_(DRAFT_v0.03.0).pdf' [2018-02-01T20:55:00.000Z] [673968] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/How-to-Uninstall-a-Program_(DRAFT_v0.04.0).docx' [2018-02-08T18:04:00.000Z] [189042] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/How-to-Uninstall-a-Program_(DRAFT_v0.04.0).pdf' [2018-02-08T18:05:00.000Z] [715035] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/How-to-Uninstall-a-Program_(DRAFT_v0.05.0).docx' [2018-03-02T18:52:00.000Z] [188176] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/How-to-Uninstall-a-Program_(DRAFT_v0.05.0).pdf' [2018-03-02T18:52:00.000Z] [777081] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/How-to-Uninstall-a-Program_(DRAFT_v0.01.0).docx' [2018-01-22T21:43:00.000Z] [90330] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/How-to-Uninstall-a-Program2_(DRAFT_v0.01.0).docx' [2017-10-18T18:19:00.000Z] [188733] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/Extensions' [2018-09-29T04:11:00.000Z] [0] is new
. 2018-10-02 17:42:05.029 Remote file '/license.txt' [2018-08-20T01:13:00.000Z] [37854] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/DiagnosticToolkit.7z' [2018-05-16T18:29:00.000Z] [272928] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/System Volume Information' [2018-09-29T01:11:00.000Z] [0] is new
. 2018-10-02 17:42:05.029 Remote file '/unins000.dat' [2018-09-29T02:44:00.000Z] [76135] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/unins000.exe' [2018-09-29T02:43:00.000Z] [1277728] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/unins000.msg' [2018-09-29T02:44:00.000Z] [22727] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/WinSCP.com' [2018-08-31T18:22:00.000Z] [284496] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/WinSCP.exe' [2018-08-31T18:22:00.000Z] [19324624] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/WinSCP.map' [2018-08-31T18:22:00.000Z] [11189107] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/WinSCPnet.dll' [2018-08-31T18:22:00.000Z] [164736] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/_Stats.xlsx' [2017-08-31T19:33:00.000Z] [222891] excluded from synchronization
. 2018-10-02 17:42:05.029 Remote file '/~$_Benchmarks.xlsx' [2017-05-19T17:48:00.000Z] [165] excluded from synchronization
< 2018-10-02 17:42:05.029 Script: Nothing to synchronize.
. 2018-10-02 17:42:05.029 Session upkeep
. 2018-10-02 17:42:05.029 Script: Exit code: 0
. 2018-10-02 17:42:05.030 Got reply 1004 to the command 1024
. 2018-10-02 17:42:05.032 Disconnected from server
Last edited by BlueToast on 2018-10-04 22:09; edited 1 time in total

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

Re: synchronize remote -mirror -filemask: excluding multiple remote directories, one which has a space

OK, I guess that those ^ in your file mask are mistake. Remove them:
"C:\Program Files (x86)\WinSCP\winscp.exe" "My%20Saved%20Session" /loglevel=1 /log="C:\temp\test.log" /command "synchronize remote -mirror -criteria=time -filemask=""|*/$RECYCLE.BIN/;*/System Volume Information/"" C:\temp\MDTDrive /"

Reply with quote

Advertisement

BlueToast
Joined:
Posts:
5

Hello, a continuation of previous posts. Here is the slightly modified scenario:

Starting command:
"C:\Program Files (x86)\WinSCP\winscp.exe" "My%20Saved%20Session" /loglevel=1 /log="C:\temp\test.log" /command "synchronize remote -mirror -criteria=time -filemask=""|*/$RECYCLE.BIN/;*/System Volume Information/"" C:\temp\MDTDrive /"
C:\temp\MDTDrive has three files test1.png, test2.png, colors.png that I don't want deleted as a result of using -mirror. How do I exclude these three files in C:\temp\MDTDrive from being touched by -mirror when it connects using Site My%20Saved%20Session to download changed files to C:\temp\MDTDrive?

Thanks!

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

Just add them to the exclusion list?
-filemask=""|*/$RECYCLE.BIN/;*/System Volume Information/;test1.png;test2.png;colors.png""

Reply with quote

Advertisement

You can post new topics in this forum