Search result and TC parameters
Moderators: Hacker, petermad, Stefan2, white
Search result and TC parameters
This isn't really bug, I'd say it's TC specificity. In search result panel %P, %T return empty string, %N, %M return path\name.ext, %O returns path\name w/o ext.
Using MVV's TCFS2 tool, I make selection by partial name. When the cursor located on tc850x32_b12.exe file, I call selection dialog, then put %O, then send backspace twice, send star. All "tc850x32_b*" are selected.
If it isn't so hard, could you to fix %parameters work, please.
Using MVV's TCFS2 tool, I make selection by partial name. When the cursor located on tc850x32_b12.exe file, I call selection dialog, then put %O, then send backspace twice, send star. All "tc850x32_b*" are selected.
If it isn't so hard, could you to fix %parameters work, please.
MVV, the idea is to select files like file01, file02... where differ last charachters (usually counter)
I use em_command, it calls selection dialog, inserts filename under cursor and removes last 2 characters.
Wow, there is Edit button, now I see it, thanks
I use em_command, it calls selection dialog, inserts filename under cursor and removes last 2 characters.
Code: Select all
[em_selByPartName]
button=
param=/ef "tcm(3312,1) send(`{DQ}%O{BS 2}*{DQ}`)"
cmd=%COMMANDER_PATH%\addons\tcfs2.exe
OK, I see. You can use batch file between TC and TCFS2 that will extract filename from path, e.g. selbypartname.bat:
Add it to buttonbar, set parameter to %P%N and enable Minimized option to hide black window.
Code: Select all
@echo off
start "" "%COMMANDER_PATH%\addons\tcfs2.exe" /ef "tcm(3312,1) send(`{DQ}%~n1{BS 2}*{DQ}`)"
It works for all filenames for me. However dialog may appear after send function is executed so no keypresses will be sent to it, also dialog must not lose focus until keypresses are sent. You should use delay or wait_for and specify window class for send.
So, this one works for me:
So, this one works for me:
Code: Select all
start "" "%COMMANDER_PATH%\addons\tcfs2.exe" /ef "tcm(3312,1) eval(delay(100)+wait_for(findwnd(`TCOMBOINPUT`), 5)) send(`{DQ}%~n1{BS 2}*{DQ}{ENTER}`, findwnd(`TCOMBOINPUT`))"
- ghisler(Author)
- Site Admin
- Posts: 50550
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The behaviour of %P and %N is intentional: If the user specified only %N, it wouldn't work in the search result. Therefore %N has to contain the full path. If he specified %P%N, it wouldn't work if %P also contained the path, so %P must be empty. Similar problems when user uses %O.otherext or %P%O.otherext.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
My often use case is to open in the new tab the folder of the file under cursor in the panel with the search results, so it would be nice if at least a single %P would work in search results.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708