PDA

View Full Version : Filter order question and how-to


09-Jan-2004, 06:01 PM
It appears include filters are processed prior to exclude filters. For example, I'd like to exclude files like "*.txt", but include files like "*.keep.txt". I have the filters in the appropriate places, but my "keep" files are being excluded. Is this possible? If so, how?

If not, it's the FIRST of MANY things I'd like BC to do that it hasn't been able to. This is an excellent program and continues to surprise me in its features and flexibility.

Craig
10-Jan-2004, 12:05 PM
Include filters are always processed first. We considered prioritizing them based on how specific the filter was, but decided that'd make things more complicated than necessary.

The only way to set the filters up to handle this would be to remove the generic *.* from Include files, along with *.txt from Exclude files.

macron
12-Jan-2004, 05:17 PM
I ended up changing the file types so it's no longer an issue for me; and it's still probably a fairly minor issue at best. But for those times where it's really necessary it would be helpful to be able to change the include/exclude order.

As a suggested enhancement, allow the user to determine the order of file include/exclude filters by combining both edit boxes into one and processing them in the order given. For example:

+ *.*
- *.txt
+ *.keep.txt

Exclude items from the context-sensitive menu would be added to the end of the list (and could be cut and past to earlier in the list if the user wanted).

This seems fairly straight forward, both to the user and to implement. On the negative side, processing time may be increased because you couldn't short-circuit the tests like your probably doing now. Of course, I don't know how your program is set up so implementation may be much more difficult.

jdmarch
13-Jan-2004, 10:18 AM
allow the user to determine the order of file include/exclude filters by combining both edit boxes into one and processing them in the order given.



Agreed

Craig
13-Jan-2004, 10:27 AM
Sounds good, I'll add it to the wishlist.

mdes
13-Jan-2004, 11:00 AM
I would prefer Regular Expressions for Files (and folders?) matches ;)