Exclude filter not working

Discuss new features and functions
Posts: 7
Joined: 11 Aug 2021

sidprice

I have the following in the list of excludes:
*.bin
*.git

The batch file has:
        <Pair>
            <Left>D:\DataRoot</Left>
            <Right>E:\DirSync_2\DataRoot</Right>
            <Filter>
                <Include>
                    <Item>*</Item>
                </Include>
                <Exclude>
                    <Item>*.bin</Item>
                    <Item>*.git</Item>
                </Exclude>
                <SizeMin Unit="None">0</SizeMin>
                <SizeMax Unit="None">0</SizeMax>
                <TimeSpan Type="None">0</TimeSpan>
            </Filter>
        </Pair>
 
However, the folders are NOT excluded. How can I fix this?
Sid
Posts: 1037
Joined: 8 May 2006

therube

How are your directories named?

If you change your <Exclude> to:
<Item>*.bin*</Item>
<Item>*.git*</Item>
does that work?
User avatar
Posts: 4056
Joined: 11 Jun 2019

xCSxXenon

https://freefilesync.org/manual.php?topic=exclude-files
You need a '\' at the end to specify directories
Posts: 7
Joined: 11 Aug 2021

sidprice

Adding the "\" did not work. However:

The full folder names are ".bin" and ".git", the backup location has those folders from previous backup runs. However, with the exclude filters added, in "mirror" mode, the folders are not removed from the backup. If I manually remove one of the folders on the backup drive and run FFS the folder is not copied to the backup.

This sounds like a bug; If a folder (and maybe a file as well) exists on the backup device and it is then excluded from the job, the backup folder is not removed.
Sid
Posts: 7
Joined: 11 Aug 2021

sidprice

That is a smart workaround, however, this is a huge backup with many, many, folders ".git" It will take hours to browse the destination list and delete them one-by-one.
:(
User avatar
Posts: 4056
Joined: 11 Jun 2019

xCSxXenon

a CMD solution may be best for you. Look into the "FOR" utility to search for all '.git' folders and delete them (rmdir)
Posts: 7
Joined: 11 Aug 2021

sidprice

Sure.

This should be a feature/option of FFS.
Sid
Posts: 3
Joined: 17 May 2023

WilliamB

Sid said
If a folder (and maybe a file as well) exists on the backup device and it is then excluded from the job, the backup folder is not removed.
I'm new to FFS, but I've been using a different file syncer for many years (SFFS), and I think if a file or folder is excluded from the job, it should be ignored, as is the case. The job should not do anything to excluded files or folders.