Page 1 of 1

Use selected files to create custom view

Posted: 2015-08-14, 09:00 UTC
by solid
Is there possibility to add a feature for adding a custom view from selected files based on extension?

For example, if there are selected files with .txt, .ini, .html then clicking this command will set the custom view to *.txt, *.ini, *.html.

I know this is currently possible with alt+Num+ for selecting all files with same extension and then showing only selected files, but this resets when switching directories.[/code]

Posted: 2015-08-14, 10:34 UTC
by MVV
Actually it is easy to realize by yourself.

Some preparations:
1. Create user-command em_Cd with command cd and parameter %A. It should look like this in your usercmd.ini:

Code: Select all

[em_Cd]
cmd=cd
param=%A
2. Save this text as custom_filter_from_selection.bat and fix path to TCFS2.exe:

Code: Select all

@echo off
if -%1==- echo Parameters: %%WF & pause & goto :EOF
for /f "usebackq delims=" %%f in (`type %1`) do set $%%~xf=*%%~xf
set $*=
for /f "usebackq delims== tokens=2" %%e in (`set $.`) do call :xadd %%e
"%COMMANDER_PATH%\Addons\TCFS2\TCFS2.exe" /ef "tem(`em_Cd %$*%`)"
goto :EOF

:xadd
set $*=%1 %$*%
3. Add a buttonbar button with path to this batch and parameter %WF and enable "run minimized" option.

Now you can select files and click a button, batch will enumerate extensions and pass them to TC using TCFS2 and TC will apply custom filter from cd command.

Posted: 2015-09-01, 09:43 UTC
by solid
Thanks MVV
I'll try.