How to show all subfolders only in current directory?

English support forum

Moderators: white, Hacker, petermad, Stefan2

drbeat
Junior Member
Junior Member
Posts: 57
Joined: 2017-01-01, 01:13 UTC

How to show all subfolders only in current directory?

Post by *drbeat »

How can I select a folder then press a toolbar button to show its subfolders only (without main folder name and file names) with unlimited depth. like this:

Main folder name: Test

After press the button I see all its subfolders.

extra
nebula
java
sdk

I don't want use branch view (full path) like that:

c:\Program Files\Main Menu\Test\extra\
c:\Program Files\Main Menu\Test\nebula\
c:\Program Files\Main Menu\Test\java\
User avatar
Stefan2
Power Member
Power Member
Posts: 4174
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: How to show all subfolders only in current directory?

Post by *Stefan2 »

Do you really need to get that view, or do you just need to get the folder names in a text file?







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

Re: How to show all subfolders only in current directory?

Post by *gdpr deleted 6 »

Hmm, a simple example:

C:\MainFolder\FooBar\FooBar\
C:\MainFolder\Snafu\FooBar\

You would end up with a display like:

FooBar
FooBar
Snafu
FooBar

How would you like to work with that?
How do you know what is what?
How do you know that i was not just lying with my example and did not try to sneak in the result based on the folder structure C:\MainFolder\FooBar\FooBar\Snafu\FooBar\ ? :twisted:


Don't get me wrong. I understand what you want to do on/with the (main) directories of your choosing. My question/post here rather aims at how to make such a feature work generally...
User avatar
Gral
Power Member
Power Member
Posts: 1473
Joined: 2005-01-26, 15:12 UTC

Re: How to show all subfolders only in current directory?

Post by *Gral »

Probably the only way is: search for folders only, feed to listbox, switch to brief view (or custom columns).
drbeat
Junior Member
Junior Member
Posts: 57
Joined: 2017-01-01, 01:13 UTC

Re: How to show all subfolders only in current directory?

Post by *drbeat »

Stefan2 wrote: 2020-08-04, 12:01 UTC Do you really need to get that view, or do you just need to get the folder names in a text file?
I need to see them in TC panel so I can for example rename in batch mode etc
drbeat
Junior Member
Junior Member
Posts: 57
Joined: 2017-01-01, 01:13 UTC

Re: How to show all subfolders only in current directory?

Post by *drbeat »

elgonzo wrote: 2020-08-04, 12:45 UTC Hmm, a simple example:

C:\MainFolder\FooBar\FooBar\
C:\MainFolder\Snafu\FooBar\

You would end up with a display like:

FooBar
FooBar
Snafu
FooBar

How would you like to work with that?
How do you know what is what?
How do you know that i was not just lying with my example and did not try to sneak in the result based on the folder structure C:\MainFolder\FooBar\FooBar\Snafu\FooBar\ ? :twisted:


Don't get me wrong. I understand what you want to do on/with the (main) directories of your choosing. My question/post here rather aims at how to make such a feature work generally...
Yours is good point but there won't be duplicate folder names because I'll mainly use it for batch rename music album folders.
drbeat
Junior Member
Junior Member
Posts: 57
Joined: 2017-01-01, 01:13 UTC

Re: How to show all subfolders only in current directory?

Post by *drbeat »

Gral wrote: 2020-08-04, 13:47 UTC Probably the only way is: search for folders only, feed to listbox, switch to brief view (or custom columns).
But how to achieve it with a button. While I tidy my hdd I need such operation very often that's why I want it as one click button.

BTW Sorry for late answer. I had serious psycho neighbourhood problems.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: How to show all subfolders only in current directory?

Post by *gdpr deleted 6 »

drbeat wrote: 2020-08-04, 14:57 UTC Yours is good point but there won't be duplicate folder names because I'll mainly use it for batch rename music album folders.
But how could you make sure there won't be any duplicate folder names when other users are going to use the feature? :wink:
Anyway, my argument is actually moot and void. As has been pointed out, the brief view mode only shows directory/file names without their path, so a situtation similar to what i described is already possible with TC. Thus, there is really not much left of my argument :shock:


drbeat wrote: 2020-08-04, 14:56 UTC I need to see them in TC panel so I can for example rename in batch mode etc
What exactly do you mean by saying "rename in batch mode"? TC has the Multi-Rename Tool. Is the MRT unsuitable for your needs? If so, how?
And why exactly would you need to list the directory names (without path) in one of TC's lister panes for renaming in batch mode? I am almost certain (but really just almost) that there is another approach to batch-renaming directories that is similarly easy (or difficult) to what you are attempting now...
User avatar
tuska
Power Member
Power Member
Posts: 3785
Joined: 2007-05-21, 12:17 UTC

Re: How to show all subfolders only in current directory?

Post by *tuska »

A manual and far from perfect solution could be the following, using the 'Everything' tool (see my signature).
Here you would also have full control over which folders to rename manually.
  • Enter the following directly in the 'Everything' search box: folder: !depth:0 "c:\Program Files\Main Menu\Test\"
  • Set sorting "Path" ascending
  • Mark folders
  • Press F2 for renaming (menu "File" - "F2 Rename")
  • Old Format: ...
  • New Format: ... --> click on the '▶'-button for options, look at 'New Filenames:'-field below... -> Preview
  • Press button 'OK' for renaming
First you should do a test.


Windows 10 Pro (x64) Version 2004 (OS build 19041.423)
Intel(R) Core(TM) i7-4770 CPU @ 3.4OGHz, 16 GB RAM
TC 9.51 x64/x86 | 'Everything'-Version 1.4.1.987 (x64) - Public release
☑ 'Everything' | Search queries: TC <=> 'Everything'
drbeat
Junior Member
Junior Member
Posts: 57
Joined: 2017-01-01, 01:13 UTC

Re: How to show all subfolders only in current directory?

Post by *drbeat »

elgonzo wrote: 2020-08-04, 16:27 UTC
drbeat wrote: 2020-08-04, 14:57 UTC Yours is good point but there won't be duplicate folder names because I'll mainly use it for batch rename music album folders.
But how could you make sure there won't be any duplicate folder names when other users are going to use the feature? :wink:
Anyway, my argument is actually moot and void. As has been pointed out, the brief view mode only shows directory/file names without their path, so a situtation similar to what i described is already possible with TC. Thus, there is really not much left of my argument :shock:


drbeat wrote: 2020-08-04, 14:56 UTC I need to see them in TC panel so I can for example rename in batch mode etc
What exactly do you mean by saying "rename in batch mode"? TC has the Multi-Rename Tool. Is the MRT unsuitable for your needs? If so, how?
And why exactly would you need to list the directory names (without path) in one of TC's lister panes for renaming in batch mode? I am almost certain (but really just almost) that there is another approach to batch-renaming directories that is similarly easy (or difficult) to what you are attempting now...
Not only batch rename, move, copy, delete all or some subfolders and many other operations. I just need see only subfolders (unlimited deep) of a folder in TC pane so I can do those operations without entering depths of lots of subfolders.
drbeat
Junior Member
Junior Member
Posts: 57
Joined: 2017-01-01, 01:13 UTC

Re: How to show all subfolders only in current directory?

Post by *drbeat »

tuska wrote: 2020-08-04, 16:48 UTC A manual and far from perfect solution could be the following, using the 'Everything' tool (see my signature).
Here you would also have full control over which folders to rename manually.
  • Enter the following directly in the 'Everything' search box: folder: !depth:0 "c:\Program Files\Main Menu\Test\"
  • Set sorting "Path" ascending
  • Mark folders
  • Press F2 for renaming (menu "File" - "F2 Rename")
  • Old Format: ...
  • New Format: ... --> click on the '▶'-button for options, look at 'New Filenames:'-field below... -> Preview
  • Press button 'OK' for renaming
First you should do a test.


Windows 10 Pro (x64) Version 2004 (OS build 19041.423)
Intel(R) Core(TM) i7-4770 CPU @ 3.4OGHz, 16 GB RAM
TC 9.51 x64/x86 | 'Everything'-Version 1.4.1.987 (x64) - Public release
☑ 'Everything' | Search queries: TC <=> 'Everything'
Thanks but I will do this operation (listing subfolders of a folder in TC pane) so ı need a toolbar button.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: How to show all subfolders only in current directory?

Post by *gdpr deleted 6 »

Hmm, maybe the "Extended Branch-View" file-system plug-in could be useful to you. It offers an extended branch view that also shows (sub-)directories in a "flat" view. You can find it at http://totalcmd.net/plugring/branchviewex.html. Check its description/readme for details. There is also a forum thread about it: viewtopic.php?f=6&t=24238

I have never used it so i can't really tell if it would be helpful or not with respect of all the different operations you intend to do in such a view mode, though.
drbeat
Junior Member
Junior Member
Posts: 57
Joined: 2017-01-01, 01:13 UTC

Re: How to show all subfolders only in current directory?

Post by *drbeat »

elgonzo wrote: 2020-08-04, 18:01 UTC Hmm, maybe the "Extended Branch-View" file-system plug-in could be useful to you. It offers an extended branch view that also shows (sub-)directories in a "flat" view. You can find it at http://totalcmd.net/plugring/branchviewex.html. Check its description/readme for details. There is also a forum thread about it: viewtopic.php?f=6&t=24238

I have never used it so i can't really tell if it would be helpful or not with respect of all the different operations you intend to do in such a view mode, though.
I've already tried it, as the other users say it crashes very often.
viewtopic.php?f=6&t=24238
User avatar
petermad
Power Member
Power Member
Posts: 14857
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to show all subfolders only in current directory?

Post by *petermad »

drbeat wrote: 2020-08-04, 14:59 UTC
Gral wrote: 2020-08-04, 13:47 UTC Probably the only way is: search for folders only, feed to listbox, switch to brief view (or custom columns).
But how to achieve it with a button. While I tidy my hdd I need such operation very often that's why I want it as one click button.
This can do half of the work for you, but you have to click the "Start" button in the Find files dialog, and click the "Feed to listbox" button afterwards.

First add this in the [Searches] section of your wincmd.ini file:

Code: Select all

Folders_SearchFor=
Folders_SearchIn=
Folders_SearchText=
Folders_SearchFlags=0|002002000020||||||||22221|0000|||

Put this in your usercmd.ini file:

Code: Select all

[em_load_folders_search]
cmd=LOADSEARCH folders

And make this button:

Code: Select all

TOTALCMD#BAR#DATA
em_load_folders_search,cm_SrcShort

wcmicons.dll,4
Show subfolders only in Search result in Brief view

1
10455
To make the button:
1. Mark the text in the box here above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctrl+C).
3. Right click on TC's buttonbar and choose "Paste".

Unfortunately it is currently not possible to start a search automatically - but I have made a request for it here: viewtopic.php?f=14&t=72462 - please support this request, if you find it useful.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
drbeat
Junior Member
Junior Member
Posts: 57
Joined: 2017-01-01, 01:13 UTC

Re: How to show all subfolders only in current directory?

Post by *drbeat »

petermad wrote: 2020-08-05, 11:20 UTC
drbeat wrote: 2020-08-04, 14:59 UTC
Gral wrote: 2020-08-04, 13:47 UTC Probably the only way is: search for folders only, feed to listbox, switch to brief view (or custom columns).
But how to achieve it with a button. While I tidy my hdd I need such operation very often that's why I want it as one click button.
This can do half of the work for you, but you have to click the "Start" button in the Find files dialog, and click the "Feed to listbox" button afterwards.

First add this in the [Searches] section of your wincmd.ini file:

Code: Select all

Folders_SearchFor=
Folders_SearchIn=
Folders_SearchText=
Folders_SearchFlags=0|002002000020||||||||22221|0000|||

Put this in your usercmd.ini file:

Code: Select all

[em_load_folders_search]
cmd=LOADSEARCH folders

And make this button:

Code: Select all

TOTALCMD#BAR#DATA
em_load_folders_search,cm_SrcShort

wciconex.dll,4
Show subfolders only in Search result in Brief view

1
10455
To make the button:
1. Mark the text in the box here above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctrl+C).
3. Right click on TC's buttonbar and choose "Paste".



Unfortunately it is currently not possible to start a search automatically - but I have made a request for it here: https://www.ghisler.ch/board/viewtopic.php?f=14&t=72462 - please support this request, if you find it useful.
Almost perfect just one point, after each time I use the button, I have to switch brief to full view, any solution for it?
Post Reply