Excluding paths from filters

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Excluding paths from filters

Post by *Black Dog »

[face=courier]
This is from TC Help:

__________transmission_from_clipboard____________

Find files: General

General
[^Y]
New: Include/Exclude certain directories in the search.
Examples:
*.ini | windows\ finds all ini files except those in directories called "Windows" and their subdirs.

______________end_of_transmission________________

So I made a filter ("G:" is my CD-ROM drive):

General
Search for: *.* | G:\
Advanced
A&ttributes: [x]&Read only

And the question is: why this filter works on "G:\"?

BTW, these fields are disabled in "Define colors by file type | Specify file type | Define selection" (i.e. can't be used in color filters):

Search in:
Find duplicate files:

And the question is: why?[/face]
User avatar
Hacker
Moderator
Moderator
Posts: 13067
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Maybe because G:\ is not a "dir" but a "drive"?

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
jb
Senior Member
Senior Member
Posts: 412
Joined: 2003-02-09, 22:56 UTC
Location: Switzerland

Post by *jb »

TC is quite restrictive regarding directory filters.

The following examples do not work (cannot exclude any directory):
*.* | G:\
*.* | G:\Tmp\
*.* | Tmp\MyTmp\

The following examples work (can exclude directories):
*.* | Tmp\
*.* | *Tmp\

It seems that TC checks whether a token ends with \. If it does then the rest of the token is considered as pattern for directory names, otherwise the token is considered as pattern for file names.

Unfortunately TC does not check whether a pattern is valid or not.
Example:
*Tmp\ specifies a valid directory name pattern.
Tmp\MyTmp\ specfies an invalid directory name pattern because directory names cannot contain a backslash.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Currently TC only excludes directories relative to the current path, not absolute dirs or multiple levels deep.
Author of Total Commander
https://www.ghisler.com
Post Reply