Excluding files in subfolders

Get help for specific problems
Posts: 1
Joined: 4 Feb 2026

ukdave

Hi,
I have a sync set of folders that runs for c:\Users\Dave\AppData => d:\backups.

I have a set of subfolders and files that i exclude, but i now want to try and exclude a specific set of files in a specific set of folders under a folder.

For example:
The sync above works great, but i want to exclude from this folder
c:\Users\Dave\AppData\Local\Microsoft\Onedrive\
all *.db files that are in different subfolders.

eg
\OneDrive\ListSync\*\settings\*.db
\Onedrive\settings\*\*.db
So i would like to exclude all *.db from all subfolders under \OneDrive\.

I have tried several combinations, but i can not find a way of making the wildcard match in all subfolders.

Am i missing something or do i just need to add in each subfolder that i want to exclude?

Cheers,
Dave
Posts: 323
Joined: 13 Apr 2017

Gianni1962

For this sync-set folder pair:
c:\Users\Dave\AppData => d:\backups

to exclude from folder:
c:\Users\Dave\AppData\Local\Microsoft\Onedrive\
all *.db files that are in different subfolders

put this in the exclude section:
\Local\Microsoft\Onedrive\*.db

Note the relative path to the left/(right) folder pair.
Posts: 323
Joined: 13 Apr 2017

Gianni1962

I have noticed that this way will be filtered out also this folder and its files despite they are not *.db:
c:\Users\Dave\AppData\Local\Microsoft\OneDrive\EBWebView\Default\EdgeCoupons\coupons_data.db

Appending a colon (:) to the filter expression, like stated in the manual, doesn't seem to work:
\Local\Microsoft\Onedrive\*.db:

Am I using the colon correctly?

A workaround is:

- add a folder pair with the same left and right folders
- move the Exclude filter from the Common settings to the Local settings of the first folder pair
- put this in the Include filter of the Local settings of the second folder pair
\Local\Microsoft\Onedrive\*.db\*

Or is there a better way?
User avatar
Posts: 2978
Joined: 22 Aug 2012

Plerry

> I have noticed that this way will be filtered out also this folder and its files despite they are not *.db

Obviously coupons_data.db does match *.db, irrespective if coupons_data.db is a file or folder.

However, if coupons_data.db is a folder, it should not match *.db: (with its appended colon).
The usage of the colon seems correct. If that does not work, I don't know why not.
Fortunately, there are often more ways to skin a cat, and your workaround works as intended.
Posts: 323
Joined: 13 Apr 2017

Gianni1962

Appending a colon in the Exclude filter, the folder is not excluded but the files in it are excluded, despite they are not *.db.
User avatar
Site Admin
Posts: 7523
Joined: 9 Dec 2007

Zenju

Appending a colon in the Exclude filter, the folder is not excluded but the files in it are excluded, despite they are not *.db. Gianni1962, 05 Feb 2026, 13:54
Hey you found a bug! Fixed: https://www.mediafire.com/file/de75p43ijhdash3/FreeFileSync_14.8_%255BBeta%255D_Windows_Setup%25283%2529.exe
Posts: 323
Joined: 13 Apr 2017

Gianni1962

Thanks Zenju!
Now the colon works as expected!