View everything one a particular level

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
JimmyTheBroker
Member
Member
Posts: 179
Joined: 2017-06-07, 05:22 UTC

View everything one a particular level

Post by *JimmyTheBroker »

Hey guys,

I want to be able to see all folders and files at a particular level (or depth) within a folder. Even if those files and folders are in different sub-directorys.

I think An example would be explain what I am looking for:

Assume we have the following folders and files.
C:\Temp
C:\Temp\word.doc
C:\Temp\a
C:\Temp\b
C:\Temp\a\a1
C:\Temp\a\Word2.doc
C:\Temp\a\a2
C:\Temp\b\b1
C:\Temp\b\b2


is there a way so I can choose what level I want to see?

Level 1, I would only see
C:\Temp

Level 2, I would only see
C:\Temp\word.doc
C:\Temp\a
C:\Temp\b


Level 3, I would only see
C:\Temp\a\a1
C:\Temp\a\Word2.doc
C:\Temp\a\a2
C:\Temp\b\b1
C:\Temp\b\b2
User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Post by *Gral »

You can use "Search" function - press ALT+F7 or ALT+SHIFT+F7 for separate search
and "Search in subdirectories" ComboBox, there is "all (unlimited depth)" selected by default.
You can choose appropiate option, also you can define your option set and save for future use (tab Load/Save)
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You can try to use Plugins tab in order to require desired ammount of slashes in paths. Also you should limit search depth to speed search up.

E.g. for your level 2 use this plugin rule:

Code: Select all

tc.path regex ^([^\\]+\\){2}[^\\]*$
And, if you're in C:\Temp, set search depth to 1.
jvh
Member
Member
Posts: 187
Joined: 2007-07-20, 12:28 UTC

Post by *jvh »

Or you can use Everything search engine in TC search...

Code: Select all

Search for: ev: C:\Temp parents:1    (or 2, 3 etc. or specify range eg. 2-3)

alternatively

Search for: ed: parents:1    (or 2, 3 etc. or specify range eg. 2-3)
Search in : C:\Temp
Everything: [x]
From Help file:
Put "ev:" in front of the search string to pass it to Everything unchanged
Put "ed:" in front of the search string: Like "ev:", but search only in the directories specified in the "Search in" field. Also handles "Search subdirectories" option...
User avatar
JimmyTheBroker
Member
Member
Posts: 179
Joined: 2017-06-07, 05:22 UTC

How do I use or make plugins?

Post by *JimmyTheBroker »

How do I use or make plugins?


I have tired to copying and pasting the "^([^\\]+\\){2}[^\\]*$"
and changing the drop down boxes to have "tc.path regex"

into alt+F7 of total commander, then going to the plugins tab, However I only get "Search results: [no files found]"


what am I doing wrong?

Thanks,
Jimmy
User avatar
JimmyTheBroker
Member
Member
Posts: 179
Joined: 2017-06-07, 05:22 UTC

Post by *JimmyTheBroker »

Gral wrote:You can use "Search" function - press ALT+F7 or ALT+SHIFT+F7 for separate search
and "Search in subdirectories" ComboBox, there is "all (unlimited depth)" selected by default.
You can choose appropiate option, also you can define your option set and save for future use (tab Load/Save)

Gral, this almost works for me.
Except if I pick level 2, it will show me everything in level 1 as well.
I have tried the other solutions people have suggested but am not sure about use to use/create plugins?
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You have Plugins tab in Search dialog, and tc plugin is always installed so you can always use it.
User avatar
JimmyTheBroker
Member
Member
Posts: 179
Joined: 2017-06-07, 05:22 UTC

Post by *JimmyTheBroker »

I am using 32 bit Total Commander. Is this a problem?

Should I be using the 64 bit? and what is the difference?

Thanks
Jimmy
I finally get notifications from emails again!!!
So happy!
User avatar
JimmyTheBroker
Member
Member
Posts: 179
Joined: 2017-06-07, 05:22 UTC

Post by *JimmyTheBroker »

MVV wrote:You have Plugins tab in Search dialog, and tc plugin is always installed so you can always use it.

Hey MVV,

I have your solution working! Its pretty amazing!

How did you come up with that?

Where would I go to learn about how to do this for myself?
(I have extensive history with VBA).
User avatar
JimmyTheBroker
Member
Member
Posts: 179
Joined: 2017-06-07, 05:22 UTC

Post by *JimmyTheBroker »

MVV wrote:You have Plugins tab in Search dialog, and tc plugin is always installed so you can always use it.

Thanks again MVV. I have another question that's related to this topic.

How could I get a view that would only show me the tips of each branch within a specific folder?

Using my original example
A view that would show the files:
C:\Temp\word.doc
C:\Temp\a\a1
C:\Temp\a\Word2.doc
C:\Temp\a\a2
C:\Temp\b\b1
C:\Temp\b\b2
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Well, I think you can only do that partially using just internal tc plugin, you can check if the item is a file:

Code: Select all

tc.file type = file
For other part of your task you need to install a plugin that checks if folder is empty. Unfortunately main plugins server totalcmd.net is inaccessible now so I can't give you a link...
User avatar
JimmyTheBroker
Member
Member
Posts: 179
Joined: 2017-06-07, 05:22 UTC

Post by *JimmyTheBroker »

When using Alt+F7 and pressing the "Feed to listbox"
is there a way to keep "Find Files"
open at the same time, and keep the "feed to listbox"
in a new search?
I finally get notifications from emails again!!!
So happy!
User avatar
JimmyTheBroker
Member
Member
Posts: 179
Joined: 2017-06-07, 05:22 UTC

Post by *JimmyTheBroker »

MVV wrote:so I can't give you a link...
Please send me the link when you can! Owe you one!

Another question.

Would it be possible to have "tc.path regex ^([^\\]+\\){XXX}[^\\]*$"
where XXX is 1 to 9 (or whatever numbers you want)
and generate multiple separate tabs?
(The "Feed to listbox" automatically closes, which is very annoying!)

Thanks
User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Post by *Gral »

Use "Search in separate process" - ALT+SHIFT+F7
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

JimmyTheBroker wrote:Please send me the link when you can! Owe you one!
Well, you can try this or this one, both should allow checking if directory is empty.
Would it be possible to have "tc.path regex ^([^\\]+\\){XXX}[^\\]*$"
where XXX is 1 to 9 (or whatever numbers you want)
and generate multiple separate tabs?
You can't do it at once, you will need multiple searches, if you want to feed results to different tabs. Note that you can hold Shift when clicking Feed to listbox button to create new tab.
Post Reply