As per the manual page on In-and Excluding
Files have to match at least one entry in the include list and none of the entries in the exclude list
Just an Include filter of \SubFolder\*.txt
(as per your suggestion), would only sync any *.txt files in \Subfolder\
or any of its sub-subfolders, but none of the other (*.txt or other type) files anywhere else in the left and right base location.
If you only
want to sync the *.txt files in \Subfolder\ (and no other files anywhere) you could indeed do that per an Include filter \Subfolder\*.txt
Alternatively, you can define your base folder pair more in detail, e.g.
and use an include filter of *.txt
However, that is not what that manual section on including and excluding is about.
That section describes a case where you want to sync everything in your base locations (i.e. all files in the root of the base locations and any of its subfolders) except for the files in \Subfolder\
, of which you only want to sync all *.txt files.
In that case you need a first sync pair with the left and right base locations defined as the parent folder of \Subfolder\
, have the standard Include filter of *
(everything), and an Exclude filter of \Subfolder\
(plus some standard exclude items, excluding some temp- and recycle related files). This part will sync all files in the root of the base locations and any of its subfolders) except for any
files in \Subfolder\
In order to add the *.txt files in \Subfolder\
to the sync, you need to define that second left-right pair.
That second left-right pair may be the same as the first left-right pair, but now use a (local!) Include filter \Subfolder\*.txt
and a (local) Exclude filter that does not
As described above, alternatively the second left-right pair may point more in detail to Subfolder, in which case you would use a (local) Include filter *.txt
and an empty or default (local) Exclude filter.