Support for SELECTFILES "*.%S:~-0,-255"

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

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

Support for SELECTFILES "*.%S:~-0,-255"

Post by *petermad »

Currently this button works when different file names are selected:

Code: Select all

TOTALCMD#BAR#DATA
SELECTFILESS
"%S:~-0,255.*"
wcmicons.dll,39
Select all items with same base names as selected items - hold Shift down to also select folders
But this one does not work if more than one file type is selected:

Code: Select all

TOTALCMD#BAR#DATA
SELECTFILESS
"*.%S:~-0,-255"
wcmicons.dll,39
Select all items with same extensions as selected items - hold Shift down to also select folders
Is there a chance that %S could be made to work with a prefix for multiple file types.
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
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Support for SELECTFILES "*.%S:~-0,-255"

Post by *petermad »

In TC 11.01rci we got this:
history.txt wrote:09.08.23 Added: Button bar, start menu, parameters field: Better handling of parameters %S, %R, %P%S and %T%R in double quotes with appended text: "%Sbeforeext%Eafterext" inserts string beforeext before extension, and string afterext after. Supports env vars in the form %|variablename| (32/64)
It would still be nice if appending strings before name could also be supported, so a contruction like "*.%S:~-0,-255" would work.
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
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Support for SELECTFILES "*.%S:~-0,-255"

Post by *ghisler(Author) »

That would indeed by nice to have, but would require extensive changes to the parameter parser - it currently just parses from left to right.
Author of Total Commander
https://www.ghisler.com
Post Reply