Custom filter defaults

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
vq
Junior Member
Junior Member
Posts: 6
Joined: 2015-08-28, 12:23 UTC
Location: Prague, Czech Republic

Custom filter defaults

Post by *vq »

I use custom filters (^F12) quite often, mostly to filter by file name extension only (*.xls, *.dwg etc.), not some more complicated masks (aaa*bbb.ccc).

After ^F12, the dialog shows the last used filter as a default. I think it would be much better to offer the default filter "*.ext" based on the currently highlighted file. (Similar to what F7 offers as a default). Alternatively, for those preferring the current behaviour, add an option in settings dialog to let the user choose which default to use.

Please could you consider this modification?
Many thanks,
Vaclav
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You can press Alt+Num+ in order to select all files with extension of focused file.
vq
Junior Member
Junior Member
Posts: 6
Joined: 2015-08-28, 12:23 UTC
Location: Prague, Czech Republic

Post by *vq »

MVV wrote:You can press Alt+Num+ in order to select all files with extension of focused file.
Thanks for this, I didn't know that shortcut.

However, it is not what I wanted. Using ^F12 I filter files to be SHOWN in the panel.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You can create a button or usercommand with shortcut:

Code: Select all

Command: cm_SelectCurrentExtension, cm_ShowOnlySelected
It will select all files with extension of focused file and then hide other files. Or you can pass a command cm_SrcUserDef and then keystrokes according to focused file's extension, e.g. with command:

Code: Select all

Command: TCFS2.exe
Parameters: /ef "tcm(314, 1) send(`*.%E`)"
You can even finally pass Enter:

Code: Select all

Command: TCFS2.exe
Parameters: /ef "tcm(314, 1) send(`*.%E{ENTER}`)"
This topic may also be useful for you, you can e.g. combine both ideas.
vq
Junior Member
Junior Member
Posts: 6
Joined: 2015-08-28, 12:23 UTC
Location: Prague, Czech Republic

Post by *vq »

Wow, that's above my current knowledge, I'll take a look at this asap
Thanks
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

Is it somehow possible to "UnSelectCurrentExtension" afterwords?
Gruß,
Karl
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

Sadly, this is not possible:

Code: Select all

cm_SelectCurrentExtension, cm_ShowOnlySelected; cm_UnselectCurrentExtension
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

Code: Select all

TOTALCMD#BAR#DATA
cm_ClearAll, cm_SelectCurrentExtension, cm_ShowOnlySelected, cm_ClearAll

wcmicons.dll,73
Show only files with current extension


-1
HTH
Holger
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

Ahh, thank you very much, Holger!

Kind regards,
Karl
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2vq

I have sevaral premade filters in my extended menus (see signature below) - one is for using the same filetype as filter.

Or copy this an paste it to the button bar:

Code: Select all

TOTALCMD#BAR#DATA
cd
%Z;"*.%E"
wcmicons.dll,25
Show Only Files with Same Extension

0
-1
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
vq
Junior Member
Junior Member
Posts: 6
Joined: 2015-08-28, 12:23 UTC
Location: Prague, Czech Republic

Post by *vq »

Thank you petermad, the codein button bar does the trick well.
Also, I have installed your menus and will see if I get used to it.
Many thanks
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

I like all solutions (from MVV, HolgerK and Petermad) and I will keep both final versions for daily work, but I have another question regarding this code from Petermad:

Code:

Code: Select all

cd 
%Z;"*.%E"
Would it be possible to change this code, that in addition I get this result: ... If filter is set folders will be hidden?

Thanks!

Kind regards,
Karl
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2tuska

Try this:

Code: Select all

TOTALCMD#BAR#DATA
cd
%Z;"*.%E" |*.*\
wcmicons.dll,25
Show Only Files with Same Extension

0
-1
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: 3760
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

Many thanks, Petermad - this works perfectly for me.

Kind regards,
Karl
Post Reply