A useful Winmerge filter

Have a question about using Celestia? Check here first for FAQs and helpful advice.
Forum rules
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Topic author
)ÎÆ(÷×(JØE)×÷)ÆÎ(
Posts: 17
Joined: 13.07.2009
With us: 14 years 11 months

A useful Winmerge filter

Post #1by )ÎÆ(÷×(JØE)×÷)ÆÎ( » 13.07.2009, 17:03

I've recently started using WinMerge to syncronize a couple of directory structures in order to keep a backup (one's a copy/backup of the other on an external drive.)

Now windows has this nasty habit of creating a hidden file called thumbs.db in any image folder and this is constantly updated by the OS. Because of this, it screws up any WinMerge comparison of those folders because they get flagged as "changed" by virtue of the fact that the thumbs.db has been updated.
So, we need to get WinMerge to ignore these irrelevant changes... Luckily, winmerge has some filters (.FLT) files for exactly this purpose and allows you to write your own.

So I wrote the following filter to make WINMERGE ignore the thumbs.db files.
Addon creators (or anyone that wants to keep copies of files synchronized may find this useful.

Code: Select all

## This is a directory/file filter for WinMerge
## This filter suppresses thumbs.db files
name: thumbs.db
desc: Suppresses Thumbs.db files

## This is an inclusive (loose) filter
## (it lets through everything not specified)
def: include

## Filters for filenames begin with f:
## Filters for directories begin with d:
## (Inline comments begin with " ##" and extend to the end of the line)

f: \Thumbs.db     ## thumbs.DB file


In the WinMerge Program folder you will see a sub-folder called "filters". Save this code there as thumbs.flt

Return to “Help Central”