How to include one and exclude the rest

Get help for specific problems
Posts: 23
Joined: 27 Aug 2007

toddandmargo

Hi All,

ffs 7.4

How do I create a rule to exclude all but *.qbw files?

Many thanks,
-T
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

Posts: 23
Joined: 27 Aug 2007

toddandmargo

Didn't help.

What I want to do is to "exclude all", then include (*.qbw)
User avatar
Posts: 2451
Joined: 22 Aug 2012

Plerry

Then simply only include "*.qbw" (and not "*")
and forget about excludes ..
Posts: 23
Joined: 27 Aug 2007

toddandmargo

Then simply only include "*.qbw" (and not "*")
and forget about excludes ..plerry
Didn't work. I got the whole potato. I had the name every exclude except *.qbw
User avatar
Posts: 2451
Joined: 22 Aug 2012

Plerry

> I had the name every exclude except *.qbw

Don't know what you mean here.

However, also looking at your request in another post in this forum about reversing the priority/precedence of the include vs. the exclude filters,
it appears (?) you do not understand and/or use these filters correctly.
As per the link provided by Zenju:
"Files and directories are only considered for synchronization if they pass all filter rules. They have to match at least one entry in the include list and none of the entries in the exclude list .."

As there is no first/then, you should not
> What I want to do is to "exclude all", then include (*.qbw)

Instead you need to: include *.qbw and exclude nothing,
which you might just as well write as: exclude nothing and include *.qbw

Applying these rules to your case (and as per my earlier reaction):
I have no *.qbw-files, but just tested with *.htm-files:
* Include filter: *.htm (as only/single entry)
* Exclude filter: (no entries; completely empty)
and it nicely only copied/synced all *.htm files in their applicable directory
structure, and none of the other files present in the left/right pair.
Posts: 7
Joined: 10 Jun 2003

paul1149

Similar problem here. I'm trying to back up my home folder in Linux. I have inclusions:

*
And Exclusions:

/.*/

The dot signals hidden folders. But I want to include certain files from those hidden folders:

/.wine/drive_c/users/Public/Application Data/The Word/Misc/my*

and they are not being included. This is part of a larger job where the * inclusion rule is necessary.
User avatar
Posts: 2451
Joined: 22 Aug 2012

Plerry

Similar problem here. I'm trying to back up my home folder in Linux. I have inclusions:

*
And Exclusions:

/.*/

The dot signals hidden folders. But I want to include certain files from those hidden folders:

/.wine/drive_c/users/Public/Application Data/The Word/Misc/my*

and they are not being included. This is part of a larger job where the * inclusion rule is necessary.paul1149
There might be many ways to skin a cat, but in the case of your example:
* keep your intial left-right folder pair and its "*" include-filter and "/.*/" exclude filter
* add a second left-right folder pair to your FFS sync
having a left location of
/.wine/drive_c/users/Public/Application Data/The Word/Misc
having a right location equivalent to the left location
having a 2nd folder pair-specific include filter of "my*"
and having a 2nd folder pair-specific exclude filter that is empty.

You might get a warning that there is an overlap between the folder-pairs you defined
(which is correct, as the second pair is a subset of the first pair), but due to the definition
you can ignore that warning.

If you have files in multiple locations in .* folders that you like to include,
you might use a 2nd folder pair repeating the initial folder pair, but now
having a 2nd pair-specific include filter listing
"/.wine/drive_c/users/Public/Application Data/The Word/Misc/my*"
and all similar file-specs to be included
and having a 2nd folder pair-specific exclude filter that is empty.
Again, you might get above said warning, that you can then ignore.