Excluding directories with user defined files

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Pudah
Junior Member
Junior Member
Posts: 2
Joined: 2008-05-04, 16:02 UTC

Excluding directories with user defined files

Post by *Pudah »

When I use user defined files CTRL-F12, I can show files of certain types while also excluding directories with *.bmp *.jpg *.png |*.*\

However, when I try to set this up using CTRL-F12 and then Define, the exact same selection criteria does not exclude directories.

After trying to do this, this is what TC saved in wincmd.ini:

Code: Select all

[searches]
Images_SearchFor=*.bmp *.jpg *.png |*.*\
Images_SearchIn=
Images_SearchText=
Images_SearchFlags=0|000002000000||||||||22222|0000|0

[Selection]
0=*.bmp *.jpg *.png |*.*\
1=|*.*\
2=*.*
Why does the same selection criteria work when typed in manually, but not when saved using Define? What am I doing wrong?
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

You did nothing wrong, it seems to be designed this way. As norfie² stated here:
HISTORY.TXT wrote:07.02.06 Added: Include/Exclude certain directories in the current file list using the "Show" - "Custom" filter, e.g. *.* | *\ hides all dirs (for a file window used with tree view). Not working with "Define" button.
If you manually enter *.*|*\ after pressing Ctrl+F12, it works.

Also
Advanced -> [X]Attributes -> [ ] Directory
and
Plugins -> tc -> directory = No
is not applied in a display filter.
Searching the forum for "hide directories" brings up some threads, but I found no other working solution for a display filter.

I didn't find a reason for this either - if this is stored in a definition, why isn't it executed when applied to a display filter?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The reason is that the directory marker \ has a different meaning in Show-Custom directly, and in (stored) searches.

In a search, it means that TC should NOT search files in the given subdirs. So for example
*.* | .svn\
will find the directories ".svn", but will not search in them.
Author of Total Commander
https://www.ghisler.com
Pudah
Junior Member
Junior Member
Posts: 2
Joined: 2008-05-04, 16:02 UTC

Post by *Pudah »

Does that mean that there is no way to specify a saved search so that directories are not returned in the results?
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Additionally: although

Code: Select all

Advanced -> [X]Attributes -> [ ] Directory
is saved/restored with search parameters for use in future searches,
the "Plugins" setting is not:

Code: Select all

Plugins -> tc -> directory = No
2ghisler(Author)
Is this by design, too?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

StatusQuo wrote:

Code: Select all

Plugins -> tc -> directory = No
Re-checked in TC 7.04a:
(now) it is saved and can be used to not display directories in search results.
For (un)marking or Ctrl+F12 custom view it is still not usable, though.
ghisler(Author) wrote:The reason is that the directory marker \ has a different meaning in Show-Custom directly, and in (stored) searches.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
Post Reply