How to show all subfolders only in current directory?

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
tuska
Power Member
Power Member
Posts: 3765
Joined: 2007-05-21, 12:17 UTC

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

Post by *tuska »

drbeat wrote:Almost perfect...
Aha, then your requirements have changed(?), because this result does not come with this:
drbeat wrote:After press the button I see all its subfolders.

extra
nebula
java
sdk

... so I can do those operations without entering depths of lots of subfolders ...
Not only the last subfolder in a path is always displayed, but all subfolders (currently with files).
But maybe I just got something wrong.

(In principle, it's the same solution as in 'Everything') up to here (all subfolders).

But I like the button very much! :)
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 »

Not changed, petermad's solution works as I wanted (except press start button) the only problem switching back to full view manually each time. I don't get your Everything solution. It needs many manual interaction, no TC toolbar button & I want to use TC not Everything tool.
User avatar
tuska
Power Member
Power Member
Posts: 3765
Joined: 2007-05-21, 12:17 UTC

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

Post by *tuska »

drbeat wrote: 2020-08-05, 14:04 UTC Not changed, petermad's solution works as I wanted (except press start button) the only problem switching back to full view manually each time.
I don't get your Everything solution. It needs many manual interaction, no TC toolbar button & I want to use TC not Everything tool.
I don't want to persuade you to anything.

Allow me just this hint:
If you use petermad's solution - involving 'Everything' -
then you will get the search results almost in real time.

Regards,
Karl
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-05, 14:16 UTC
drbeat wrote: 2020-08-05, 14:04 UTC Not changed, petermad's solution works as I wanted (except press start button) the only problem switching back to full view manually each time.
I don't get your Everything solution. It needs many manual interaction, no TC toolbar button & I want to use TC not Everything tool.
I don't want to persuade you to anything.

Allow me just this hint:
If you use petermad's solution - involving 'Everything' -
then you will get the search results almost in real time.

Regards,
Karl
I'm open to every solution but I couldn't understand yours. How to involve Everything? Also your solution below has many steps without a button.
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
User avatar
Stefan2
Power Member
Power Member
Posts: 4159
Joined: 2007-09-13, 22:20 UTC
Location: Europa

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

Post by *Stefan2 »

drbeat wrote: 2020-08-05, 14:04 UTC Not changed, petermad's solution works as I wanted (except press start button) the only problem switching back to full view manually each time. I don't get your Everything solution. It needs many manual interaction, no TC toolbar button & I want to use TC not Everything tool.
2drbeat
just for your information to bring in some more ligth:

TCs search can call the Everything.exe since Total Commander 9.0 (2015).
And, an TC Search can be called from an button.

Not sure if that will help in your situation.
I am guessing that tuska wanted to suggest something like that?





More Info:
How to use "Everything" indexing utility with TC? by tuska
How to use "Everything" indexing utility with TC? >> viewtopic.php?p=349874#p349874
Can i search folder that contain for example flac audio files? >> viewtopic.php?p=355238#p355238
Search queries in TC using 'Everything' (summary 2020) >> viewtopic.php?p=367192#p367192
User avatar
tuska
Power Member
Power Member
Posts: 3765
Joined: 2007-05-21, 12:17 UTC

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

Post by *tuska »

2drbeat
If you want to work in Total Commander, I suggest you to use the solution of petermad.

If you want to achieve a serious improvement in terms of speed in getting the search results in TC, here's what I recommend:
  • Download the portable version of 'Everything' and unpack the two files into the system drive, e.g. in the path C:\Tools\Everything
  • See also Installation Instructions
  • After starting 'Everything' set these important options (menu "Tools" -> "Options..." -> "General")
  • [x] Start Everything on system startup
  • [ ] Run as administrator
  • [x] Everything Service
  • Indexes, NTFS drives -> check settings; set network drives under "Folders"
  • Remaining settings according to your likings; see also: settings TC <-> 'Everything'
  • It is recommended to read the instructions in the documentation (see: links before mentioned by Stefan, my signature)
If you have made the most important settings mentioned above, you should already have the search results in TC available faster.

Good luck!
If you have questions about the topic 'Everything', please use an existing topic or open a new one.


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.988 (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 »

Stefan2 wrote: 2020-08-05, 14:30 UTC
drbeat wrote: 2020-08-05, 14:04 UTC Not changed, petermad's solution works as I wanted (except press start button) the only problem switching back to full view manually each time. I don't get your Everything solution. It needs many manual interaction, no TC toolbar button & I want to use TC not Everything tool.
2drbeat
just for your information to bring in some more ligth:

TCs search can call the Everything.exe since Total Commander 9.0 (2015).
And, an TC Search can be called from an button.

Not sure if that will help in your situation.
I am guessing that tuska wanted to suggest something like that?





More Info:
How to use "Everything" indexing utility with TC? by tuska
How to use "Everything" indexing utility with TC? >> viewtopic.php?p=349874#p349874
Can i search folder that contain for example flac audio files? >> viewtopic.php?p=355238#p355238
Search queries in TC using 'Everything' (summary 2020) >> viewtopic.php?p=367192#p367192
But how to make a toolbar button for showing all subfolders (without files) of a folder
tuska wrote: 2020-08-05, 15:12 UTC 2drbeat
If you want to work in Total Commander, I suggest you to use the solution of petermad.

If you want to achieve a serious improvement in terms of speed in getting the search results in TC, here's what I recommend:
  • Download the portable version of 'Everything' and unpack the two files into the system drive, e.g. in the path C:\Tools\Everything
  • See also Installation Instructions
  • After starting 'Everything' set these important options (menu "Tools" -> "Options..." -> "General")
  • [x] Start Everything on system startup
  • [ ] Run as administrator
  • [x] Everything Service
  • Indexes, NTFS drives -> check settings; set network drives under "Folders"
  • Remaining settings according to your likings; see also: settings TC <-> 'Everything'
  • It is recommended to read the instructions in the documentation (see: links before mentioned by Stefan, my signature)
If you have made the most important settings mentioned above, you should already have the search results in TC available faster.

Good luck!
If you have questions about the topic 'Everything', please use an existing topic or open a new one.


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.988 (x64) - Public release
☑ 'Everything' | Search queries: TC <=> 'Everything'
I know how to integrate Everything to TC. I don't need faster results. Petermad's solution just what I need but switching to full view each time is burdensome. BTW Thank you very much for your extensive efforts.
User avatar
tuska
Power Member
Power Member
Posts: 3765
Joined: 2007-05-21, 12:17 UTC

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

Post by *tuska »

drbeat wrote: 2020-08-05, 15:58 UTC But how to make a toolbar button for showing all subfolders (without files) of a folder
wincmd.ini

Code: Select all

[Searches]
Subfolders_only_SearchFor=ed:folder: !depth:0
Subfolders_only_SearchIn=
Subfolders_only_SearchText=
Subfolders_only_SearchFlags=0|007002010021|||||||||0000|||
usercmd.ini

Code: Select all

[em_load_subfolders_only_search]
cmd=LOADSEARCH subfolders_only
Button

Code: Select all

TOTALCMD#BAR#DATA
em_load_subfolders_only_search,cm_SrcShort

wcmicons.DLL,22
Subfolders_only || em_load_subfolders_only_search,cm_SrcShort|em_command: LOADSEARCH Subfolders_only|Everything parameters available!|Search for: ed:folder: !depth:0  <-> [x] 'Everything'|https://ghisler.ch/board/viewtopic.php?f=3&t=72457


10076
User avatar
tuska
Power Member
Power Member
Posts: 3765
Joined: 2007-05-21, 12:17 UTC

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

Post by *tuska »

drbeat wrote: 2020-08-05, 15:58 UTC ... switching to full view each time is burdensome.
Not with this button

Code: Select all

TOTALCMD#BAR#DATA
cm_SrcViewMode0,em_ClearAllFilter,cm_50Percent,cm_RereadSource

wcmicons.dll,86
cm_SrcViewMode0,em_ClearAllFilter,cm_50Percent,cm_RereadSource|View mode <Standard>: cm_SrcViewMode0|Active panel!|-|em_ClearAllFilter: cmd=cd *.*|Reread Source Ctrl+R; cm_rereadsource 1,2,3 (as of TC 9.50)|https://ghisler.ch/board/viewtopic.php?f=3&t=72457


-1
Command: cm_SrcViewMode0 sets the view to View Mode <Default>, both for the View Mode and for a Custom columns view!

For the button to work, e.g. the following entries must be made:
usercmd.ini

Code: Select all

[em_ClearAllFilter]
cmd=cd *.*
wincmd.ini
[ViewModes]

Code: Select all

0_name=<Standard>
0_icon=
0_options=1|0|0||-1|-1|-1|-1|-1
I don't know if <Standard> or <default> is correct - for the default-View Mode - when using the language English.
The View mode setting can also be made manually as follows:
Configuration -> Options... -> View mode -> <Standard>, <Vorgabe> or whatever... -> that would be interesting to know...
Columns view: Full, Sort order: Name
User avatar
petermad
Power Member
Power Member
Posts: 14826
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

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

Post by *petermad »

I have to switch brief to full view, any solution for it?
No, if I add a command for switching to Full view, then it would be doen immediately after the switch to Brief view.

If you know you always want full view after leaving a search result, it can be done with a View Mode and an Auto Switch Mode:

1. Make a View Mode called: "Search result"
2. in the "Auto-run commands:" field enter:

Code: Select all

|cm_SrcLong
3. Make an Auto Switch Mode for S: Search result and choose that "Search result" at "Set this mode:"

See: https://madsenworld.dk/tcmd/searchresult1.png and https://madsenworld.dk/tcmd/searchresult2.png

Then when you press BackSpace to leave the Search result, Full view should be used.
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
User avatar
petermad
Power Member
Power Member
Posts: 14826
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

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

Post by *petermad »

2tuska
[em_ClearAllFilter]
cmd=cd *.*
Why not just use cm_SrcAllFiles - it does the same - and without resetting the Custom mask (Ctrl+F12)

cm_SrcViewMode0,em_ClearAllFilter,cm_50Percent,cm_RereadSource
I think that this will do the same witout need for editing wincmd.ini and usercmd.ini:

Code: Select all

cm_SrcLong,cm_SrcAllFiles,cm_50Percent
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
User avatar
tuska
Power Member
Power Member
Posts: 3765
Joined: 2007-05-21, 12:17 UTC

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

Post by *tuska »

petermad wrote: 2020-08-05, 21:06 UTC 2tuska
[em_ClearAllFilter]
cmd=cd *.*
Why not just use cm_SrcAllFiles - it does the same - and without resetting the Custom mask (Ctrl+F12)
That was my first thought back then "when I was struggling with the filters" ;-)
and I overlooked the fact that there was this command.

Thanks for pointing this out, I have now adapted my button as follows:
Button
Button

Code: Select all

TOTALCMD#BAR#DATA
cm_SrcViewMode0,cm_SrcAllFiles,cm_50Percent,cm_RereadSource

wcmicons.dll,86
cm_SrcViewMode0,cm_SrcAllFiles,cm_50Percent,cm_RereadSource|View mode <Standard>: cm_SrcViewMode0|Active panel!|-|cm_rereadsource Ctrl+R|-|cm_rereadsource 1|cm_rereadsource 2|cm_rereadsource 3 (as of TC 9.50)|https://ghisler.ch/board/viewtopic.php?f=3&t=72457


-1
Notes

Code: Select all

cm_SrcViewMode0	... Sets the view to View Mode <Default>, both for the View Mode and for a Custom columns view! 
cm_SrcAllFiles	... Show all files -> menu "Show" - "All Files Ctrl+F10"
cm_50Percent	... Window separator at 50%
cm_RereadSource	... Reread source
This button covers many possibilities, but it cannot reset every view variant to <Default>.
petermad wrote: 2020-08-05, 21:06 UTC 2tuska
cm_SrcViewMode0,em_ClearAllFilter,cm_50Percent,cm_RereadSource
I think that this will do the same witout need for editing wincmd.ini and usercmd.ini:

Code: Select all

cm_SrcLong,cm_SrcAllFiles,cm_50Percent
These are too few parameters for me in this case, I had to add cm_RereadSource:

Code: Select all

cm_SrcLong,cm_SrcAllFiles,cm_50Percent,cm_RereadSource
In any case, there are several button solutions to reset the view in this case.

In this case, a button with these parameters is certainly sufficient/recommended, although the command cm_50Percent
would not be needed either. Maybe someday, when you've got deals with View modes, the other button (as preparation?)
probably can't do any harm either.
User avatar
tuska
Power Member
Power Member
Posts: 3765
Joined: 2007-05-21, 12:17 UTC

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

Post by *tuska »

drbeat wrote: 2020-08-05, 13:15 UTC ... I have to switch brief to full view, any solution for it?
A button with this command is also sufficient for this case:

Code: Select all

cm_SrcLong,cm_RereadSource
With the button solutions it only depends on whether you only want to cover this purpose or maybe later also other possibilities.
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-06, 12:41 UTC
drbeat wrote: 2020-08-05, 13:15 UTC ... I have to switch brief to full view, any solution for it?
A button with this command is also sufficient for this case:

Code: Select all

cm_SrcLong,cm_RereadSource
With the button solutions it only depends on whether you only want to cover this purpose or maybe later also other possibilities.
Thanks lot for switch button. There's just one problem. With your latest search code besides subfolders, main folders also listed. Could you fix it?
User avatar
tuska
Power Member
Power Member
Posts: 3765
Joined: 2007-05-21, 12:17 UTC

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

Post by *tuska »

drbeat wrote: 2020-08-06, 13:48 UTC With your latest search code besides subfolders, main folders also listed. Could you fix it?
If you have inserted this code in the wincmd.ini as specified above in the [Searches] section then this should not be the case.

Code: Select all

Subfolders_only_SearchFor=ed:folder: !depth:0
Subfolders_only_SearchIn=
Subfolders_only_SearchText=
Subfolders_only_SearchFlags=0|007002010021|||||||||0000|||

Code: Select all

ed:folder: !depth:0 
means the following:

Code: Select all

ed:		Search in TC using 'Everything' parameters, starting from the current directory
folder:		Search for folders only
!		NOT
depth:0		depth:<count> ... Search for files and folders with the specified folder depth.
Please check your entries again.

(A second section [Searches] will hopefully not be in the wincmd.ini by mistake?)
Post Reply