D2
Guest

Hi there,

I am trying to exclude Thumbs.db and .DS_Store from a synchronize command in a script file.
Here is my command:
synchronize -filemask=""|*/Thumbs.db;*/.DS_Store"" -delete -resumesupport=off remote D:\XXXX ./
Also tried -filemask=""|Thumbs.db;.DS_Store""
The result is no sync at all, Thumbs.db nor test.txt file.
The Doc says
You cannot use this in source parameters of script command
and the footnote says
Note that this restriction does not apply to -filemask switch in scripting
I am a little bit lost :)
So my question: is it possible to use this switch in a txt script file? Or how do I exclude those files?

martin
Joined:
Posts:
36,025
Location:
Prague, Czechia

## Re: filemask in script file

The |Thumbs.db;.DS_Store is correct. Whether there should be the double double-quotes, depends on a context, where you use the command (command-line or script file).

If this does not work, please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

D2
Guest
Whether there should be the double double-quotes, depends on a context, where you use the command (command-line or script file)
Yes!!! Got it!
synchronize -filemask="|Thumbs.db;.DS_Store" -delete -resumesupport=off remote D:\XXXX ./
Simple double-quotes for script file, double double-quotes for command line.
It works like a charm now.
Thank you very much Martin!

You can post new topics in this forum