Exclude file extension in specific directory - file filter

Open discussion about WinMerge.

Exclude file extension in specific directory - file filter

Postby al34t97 » Wed Aug 28, 2019 10:07 pm

Hello,
I am lost because I don't know regular expressions. I have the file filter working on removing files that I never want to compare with this

f: \.evt$

So that works great, I never want to see any file with a *.evt extension. What I am having trouble with is excluding files with an extension inside a specific directory. For example I have this file structure

\somefile.txt
\Screen\somefile.txt
\Screen\file_two.txt
\Screen\other_deal.scr
\Database\somefile.txt

I want to be able to exclude basically \Screen\*.txt files only. There are other text files I want to keep (like the above one in the database directory and the root). How can I do this?
I have tried
f: \\Screen\\\.txt$

but that doesn't work... and after searching for a while I couldn't find it anywhere. This is my test script I have below for full reference. I think I am getting the polish mindset for exclude/include correct.
Code: Select all
## This is a directory/file filter template for WinMerge
name: HMI
desc: Filter for HMI ignoring alh, hst and evt

## Select if filter is inclusive or exclusive
## Inclusive (loose) filter lets through all items not matching rules
## Exclusive filter lets through only items that match to rule
## include or exclude
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: \.hst$ ## Filter for filename - includes all but these matches
f: \.evt$
f: \.alh$
f: \\Screen\\\.TXT$   

##f: \\Screen$  ##\.TXT$

## I know this excludes screen directory - "d: \\Screen$"


##d: \\subdir$ ## Filter for directory


Thanks!
al34t97
 
Posts: 1
Joined: Wed Aug 28, 2019 9:57 pm

Return to Open Discussion

Who is online

Users browsing this forum: Bing [Bot] and 8 guests

cron