I've used multiple file masks for years, and I just found out you can have exclusion masks. That's excellent! I did notice something a little odd, though.
I wanted to show all files that end with _x.sql but didn't contain _comp_. So, I thought I'd use this mask list:
*_x.sql,!*_comp_*
Unfortunately, V shows every file in the folder except for those with a mask of *_comp_*.sql. This includes files ending in .bak and files containing _comp_ that didn't end in _x.sql.
But if I reverse the order of the masks:
!*_comp_*,*_x.sql
V does exactly what I expect.
I'm okay with doing that, I just didn't expect it. Should the exclusions always come first?
Problem with multiple file masks
Moderator: vuser
-
- Site Admin
- Posts: 287
- Joined: Fri Apr 30, 2010 5:50 pm
Re: Problem with multiple file masks
No. As you have found out, this will not work.*_x.sql,!*_comp_*
Multiple file masks will (usually) display files that match any of the masks. In the above example, .bak files will match !*_comp_*, so they will be displayed.
Yes. Putting the exclusion at the beginning causes V to display files that match all of the masks.But if I reverse the order of the masks (!*_comp_*,*_x.sql) V does exactly what I expect.
It has been a while since I implemented this - and I can't recall if this behavior is accidental or intentional. I'd like to think it is the latter!
Regards,
Charles.