need help on excluding a specific file name during sync

Advertisement

Arjun
Joined:
Posts:
10
Location:
Sri Lanka

need help on excluding a specific file name during sync

hi,

i need to exclude *_LTR_* and *_TOB_* from my sync list and not able to do this,

tried these but none helped (both style)

option exclude "[A-Z]_LTR_[A-Z].gz"
option exclude "?_TOB_?"


pls help

Reply with quote E-mail

Advertisement

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

Re: need help on excluding a specific file name during sync

The current syntax in the latest version of WinSCP is:
synchronize -filemask="|*_LTR_*; *_TOB_*" ...
Though the "option exclude" should still work, althought it is deprecated.

Reply with quote

Arjun
Joined:
Posts:
10
Location:
Sri Lanka

Re: need help on excluding a specific file name during sync

sorry, couldnt catch, kindly could you pls give an example

my script looks like this at the excluding area,
i tried both the "?" and "*" to check but both failing to [b]exclude [/b]

option transfer binary
option exclude ".removed_logs"
option exclude "?_TOB_?"
option exclude "?_S17-?"
option exclude "?_TS_?"
option exclude "*_LTR_*"
option exclude "*_TOB_*"
synchronize local E:\Logs\ /Incoming

an example would help i guess ..

[quote="prikryl"]The current syntax in the latest version of WinSCP is:
synchronize -filmask="|*_LTR_*; *_TOB_*" ...
Though the "option exclude" should still work, althought it is deprecated.[/quote]

Reply with quote E-mail

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

Re: need help on excluding a specific file name during sync

First, I have edited my response, it should be -filemask=.

Even if you insist on using deprecated "option exclude", you need to combine all masks into one. What you are doing that that every call to option exclude overwrite the previous value. They do not add-up. See https://winscp.net/eng/docs/scriptcommand_option
E.g.
option exclude ".removed_logs; *_TOB_*; *_S17-*"

Reply with quote

Advertisement

You can post new topics in this forum