This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Search for folders with specified number of subfolders

 
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) Printable version
View previous topic :: View next topic  
Author Message
rqqt
New Member
New Member


Joined: 08 Jun 2018
Posts: 1

PostPosted: Fri Jun 08, 2018 7:54 pm    Post subject: Search for folders with specified number of subfolders Reply with quote

I'm trying to find directories with more than X number of subdirectories.

I can do that already with DirSizeCalc or FileX plugins, but the results show ALL the subfolders.

Is it possible to just show the top-most folder?

For example:

If you have:

Code:
a\1\2\3\foo.txt
b\1\2\3\foo.txt


TC will show this in the results:

Code:
a
1
2
3
b
1
2
3


I just want the results to show the top-most folder, like this:

Code:
a
b
Back to top
View user's profile Send private message
Stefan2
Power Member
Power Member


Joined: 13 Sep 2007
Posts: 1928
Location: Europa

PostPosted: Sat Jun 09, 2018 1:07 am    Post subject: Re: Search for folders with specified number of subfolders Reply with quote

rqqt wrote:
...
I'm trying to find directories with more than X number of subdirectories.

...

Is it possible to just show the top-most folder?


I didn't understood, but see the drop-down menu "Search in subdirectories: All"





 
_________________
The destination is one thing. Getting there is everything.
Back to top
View user's profile Send private message
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 7794
Location: Valsted, Denmark

PostPosted: Sat Jun 09, 2018 5:32 am    Post subject: Reply with quote

2rqqt
May I suggest that you make a Custom column with this fleld content: [=dirsizecalc.Directory Count] - then you can sort by this column
_________________
#524
Danish Total Commander Translator
TC 9.20rc1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit. TC 2.91b3 on Android 6.0

Get Extended Total Commander Menus
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tuska
Power Member
Power Member


Joined: 21 May 2007
Posts: 1091

PostPosted: Sat Jun 09, 2018 5:59 am    Post subject: Reply with quote

Using Everything makes this solution possible.

1. ALT+SHIFT+F7 Find in separate process in TC
2. Field "Search for:" ev:childfoldercount:3    -> Everything Functions ...
    childfoldercount:<count> ... Search for folders that contain the specified number of subfolders.
3. Field "Search in:" is ignored with parameter ev:
4. 'Everything' ... must be ticked!
5. Click on "Start search..."
6. Click on "Feed to listbox"

In such a case, I would recommend the following:

Custom columns view
Configuration > Options... > Custom columns > New > Name: e.g. File name and path > Add column > click on the "+"-plus sign
choose plugin: tc > click in field "Filter:" enter path, OK > add Caption: Path --> Field contents: [=tc.path]
tick "Adjust Tabs to window width" and "Horizontal scrollbar" > OK

View Mode
Configuration > Options... > View Mode > Add: e.g. Search >
Columns view: choose "File name and path" with dropdown arrow (= name of your Custom columns view) > OK
View Mode <Default> - Attention: Here you should make settings in case a view mode is ended.
E.g. Columns view: Full, Sort order: Name

Auto Switch Mode
Configuration > Options... > Auto Switch Mode >
Tick "Automatically switch view mode on directory change:" > Add...: Rule (use dropdown arrow) = S: Search result >
Set this mode: (use dropdown arrow) = Search (= name of your View Mode) > OK

The result is the names of the top-most folders which contain 3 subdirectories and the path of the top-most folders.

Button
A button with command: cm_SrcViewMode0 allows the standard/default view to be restored at any time.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group