Use selected files to create custom view

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
solid
Power Member
Power Member
Posts: 755
Joined: 2004-08-09, 11:20 UTC

Use selected files to create custom view

Post 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]
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post 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.
User avatar
solid
Power Member
Power Member
Posts: 755
Joined: 2004-08-09, 11:20 UTC

Post by *solid »

Thanks MVV
I'll try.
Post Reply