search for directory structure

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
woolbarrel
New Member
New Member
Posts: 1
Joined: 2021-01-13, 13:06 UTC

search for directory structure

Post by *woolbarrel »

I am dealing with an extensive directory structure in which directory names often repeat. Can I search for specific directory tree branches, like f.e.

Code: Select all

abc/defg/hijkl
, regardless of where in the structure they occur? plainly writing it in returns no results, just like inserting a space between a superfolder and subfolder. I am using the directory attribute on the advanced search tab.

thabks
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: search for directory structure

Post by *gdpr deleted 6 »

Use the "Find Files" feature (Alt+F7). As search term, enter abc\defg\hijkl, followed by a SPACE.
The SPACE at the end is IMPORTANT.
Also, the directory path must not end with a backslash (using abc\defg\hijkl\<SPACE> as search term wouldn't work).
And using forward slashes (/) won't work either in this scenario - you will have to use backslashes.

The thing with the terminating SPACE character looks strange at first glance. It becomes less strange when you learn that TC's file search allows to restrict the search to certain directories or directory paths by putting these dir names or dir paths in front of the dir/file name mask, separated by space characters. Now, since we only want to search for a directory path but not for individual directory/file names, we leave the dir/file name mask empty, which leads to the kinda strange search term "<DirectoryPath><SpaceCharacter>". :)
User avatar
petermad
Power Member
Power Member
Posts: 16034
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: search for directory structure

Post by *petermad »

I can add, that if you use 'Everything' you don't need the space.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply