How can I make a filter only show files(exclude dirs)?
Moderators: white, Hacker, petermad, Stefan2
How can I make a filter only show files(exclude dirs)?
Hi,all,
Once I press Ctrl+F12, a dialog shown and we can make a filter to filte the file list. but, how can I make a filter which only show files not directories?
Thank you.
Once I press Ctrl+F12, a dialog shown and we can make a filter to filte the file list. but, how can I make a filter which only show files not directories?
Thank you.
- Vochomurka
- Power Member
- Posts: 814
- Joined: 2005-09-14, 22:19 UTC
- Location: Russia
- Contact:
Yes, you easily can, using PowerPro scripts
Single user license #329241
PowerPro scripts for Total Commander
PowerPro scripts for Total Commander
To Lefteous
I've created a filter "OnlyDirs" that selects only directories. It works fine for colours. But when Ctrl-F12 >OnlyDirs nothing happens. All files and dirs are shown, nothing is hidden. What is wrong ?You can do this in a two step procedure. First apply the desired filter to select the files to show then show only selected files.
Hi, jjk.
Something must be wrong with your filter definition.
I suggest you proceed like this:
+ Open your wincmd.ini
+ Locate the [Search] section
+ Inside it locate your "DirsOnly" filter.
Compare it to mine. There must be a difference. My filter works fine.
The 1 inside the string 22221 decides that the D attribute must be set. Only folders have it.
Karl
Something must be wrong with your filter definition.
I suggest you proceed like this:
+ Open your wincmd.ini
+ Locate the [Search] section
+ Inside it locate your "DirsOnly" filter.
Compare it to mine. There must be a difference. My filter works fine.
Code: Select all
DirsOnly_SearchFor=*.*
DirsOnly_SearchIn=.
DirsOnly_SearchText=
DirsOnly_SearchFlags=0|000002000020||||||||22221|0000
Karl
MX Linux 21.3 64-bit xfce, Total Commander 10.52 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
Hi, Lefteous.
For the OnlyDirs filter it is not necessary to take the second step and select "Only selected files".
Show => Custom => >OnlyDirs is enough, because only folders have got the D attribute (D=directory, from the good old times when folders were still called directories).
You may have missed that jjk is trying to achieve the exact opposite of the thread title:
P.S.:
Interesting phenomenon:
When I created this "OnlyDirs" filter, it would only work, if I created it inside the "Search => Find files" dialogue (Alt-F7), but not if I created it inside "Show => Custom => Custom" dialogue.
I tried this several times and could reproduce this (mis)behaviour on WinXP Prof Sp1, TC 6.54a.
Karl
For the OnlyDirs filter it is not necessary to take the second step and select "Only selected files".
Show => Custom => >OnlyDirs is enough, because only folders have got the D attribute (D=directory, from the good old times when folders were still called directories).
You may have missed that jjk is trying to achieve the exact opposite of the thread title:
--jjk wrote:I've created a filter "OnlyDirs" that selects only directories.
P.S.:
Interesting phenomenon:
When I created this "OnlyDirs" filter, it would only work, if I created it inside the "Search => Find files" dialogue (Alt-F7), but not if I created it inside "Show => Custom => Custom" dialogue.
I tried this several times and could reproduce this (mis)behaviour on WinXP Prof Sp1, TC 6.54a.
Karl
MX Linux 21.3 64-bit xfce, Total Commander 10.52 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
Sorry and apologizes
I've created a filter "OnlyFiles" that selects only files. It works fine for colours. But when Ctrl-F12 >OnlyFiles nothing happens. All files and dirs are shown, nothing is hidden.
Effectively, for "OnlyDirs", only the dirs are shown, and files are hidden. It works fine.
But with OnlyFiles dirs are still shown (and files also of course).
Thx for your reply, but I ask you for a second answer please.
I meaned the exact opposite :I've created a filter "OnlyDirs" that selects only directories. It works fine for colours. But when Ctrl-F12 >OnlyDirs nothing happens. All files and dirs are shown, nothing is hidden.
I've created a filter "OnlyFiles" that selects only files. It works fine for colours. But when Ctrl-F12 >OnlyFiles nothing happens. All files and dirs are shown, nothing is hidden.
Effectively, for "OnlyDirs", only the dirs are shown, and files are hidden. It works fine.
But with OnlyFiles dirs are still shown (and files also of course).
Thx for your reply, but I ask you for a second answer please.