Page 1 of 1

Custom filter defaults

Posted: 2015-09-04, 08:06 UTC
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

Posted: 2015-09-04, 10:01 UTC
by MVV
You can press Alt+Num+ in order to select all files with extension of focused file.

Posted: 2015-09-04, 10:14 UTC
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.

Posted: 2015-09-04, 10:33 UTC
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.

Posted: 2015-09-04, 10:49 UTC
by vq
Wow, that's above my current knowledge, I'll take a look at this asap
Thanks

Posted: 2015-09-04, 17:51 UTC
by tuska
Is it somehow possible to "UnSelectCurrentExtension" afterwords?

Posted: 2015-09-04, 17:58 UTC
by tuska
Sadly, this is not possible:

Code: Select all

cm_SelectCurrentExtension, cm_ShowOnlySelected; cm_UnselectCurrentExtension

Posted: 2015-09-04, 18:08 UTC
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

Posted: 2015-09-04, 18:17 UTC
by tuska
Ahh, thank you very much, Holger!

Kind regards,
Karl

Posted: 2015-09-04, 20:25 UTC
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

Posted: 2015-09-04, 21:07 UTC
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

Posted: 2015-09-07, 16:23 UTC
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

Posted: 2015-09-07, 19:48 UTC
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

Posted: 2015-09-07, 22:05 UTC
by tuska
Many thanks, Petermad - this works perfectly for me.

Kind regards,
Karl