Before posting, and to avoid disappointment, please read the following:

  • This forum is not for 2BrightSparks to provide technical support. It's primarily for users to help other users. Do not expect 2BrightSparks to answer any question posted to this forum.
  • If you find a bug in any of our software, please submit a support ticket. It does not matter if you are using our freeware, a beta version or you haven't yet purchased the software. We want to know about any and all bugs so we can fix them as soon as possible. We usually need more information and details from you to reproduce bugs and that is better done via a support ticket and not this forum.

Copy Only Files Containing Specific Characters

For technical support visit https://support.2brightsparks.com/
Post Reply
Conure2100
Newbie
Newbie
Posts: 4
Joined: Tue May 10, 2005 12:55 pm

Copy Only Files Containing Specific Characters

Post by Conure2100 »

I am using Syncback SE V6.5.48.0

I have a directory full of files and subfolders. I am creating a Backup profile to copy only FILES that end in RFA and contain D3.

I have these filters:

*\
*D3*.rfa

It copies files that contain D3, but it also copies files in FOLDERS that contain D3 in the name of the folder - But those files do not contain D3.

How can I copy just the files, but still search all subfolders?
cliffhanger
Expert
Expert
Posts: 606
Joined: Tue May 31, 2011 5:59 pm

Re: Copy Only Files Containing Specific Characters

Post by cliffhanger »

Hi, I don't think it is possible using DOS Expressions (the default Filter type), because the wildcard * character I have underlined in your submitted filter

*D3*.rfa

will match any number of any characters including one or more backslash characters. If the process submits to the filter logic a path that contains a backslash (say, ...D3something\else.rfa) the DOS Expression logic will declare a match because that * matches the string 'something\else'

The only putative solutions I can think of involve using Regular Expressions* instead of DOS Expressions. For all I know, it may be possible in RegEx to make the equivalent of 'a wild card with exceptions' (e.g. a sub-expression that represents 'one or more of any characters except backslash' ) but I am by no means sure any such possibility exists, it's just an idea. Alternatively, if you know the range of other characters that will occur in the fileset's paths (for example, 'only alphanumeric characters' would be simplest to deal with), you may be able to use RegEx to express a filter that only matches the ranges a-z, A-Z and 0-9 - but no others (so, no match for backslashes =D> ). TBOMK you cannot achieve this with DOS Expression filters as they don't handle character ranges (in any application, AFAIK)

Sorry, but you'd need to look elsewhere (than me - regex gives me a migraine) for more background if you need it. This article (and the Help) may be a start. Note that as stated in both places, 2BS don't give bespoke tech support on RegEx (especially as any support for V6 officially ended around end-2015 IIRC...).

* You would need to switch the profile into using RegEx Filters (you can't simply enter RegEx into the Filters dialog as per its default setting and expect them to work). Check the contextual Help (F1) on the Filters dialog to find where the toggle is in V6 (I think it has changed in meantime)
Conure2100
Newbie
Newbie
Posts: 4
Joined: Tue May 10, 2005 12:55 pm

Re: Copy Only Files Containing Specific Characters

Post by Conure2100 »

Thanks very much for your answer, Cliff!
I had same results with FreeFileSync.
Post Reply