manipulation of variables within TC

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
igarny
Junior Member
Junior Member
Posts: 74
Joined: 2023-01-26, 19:01 UTC

manipulation of variables within TC

Post by *igarny »

Hey guys,

Would it happen that there is a way to manipulate the variables within TC operation without relaying on external script.

A similar approach to this: https://ss64.com/nt/syntax-substring.html
but at best it would be to support some regular expression syntax.

Just dreaming about it :idea:
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: manipulation of variables within TC

Post by *Stefan2 »

That is already possible with the syntax used in MRT (MultiRenameTool, press there F1 and read the help)

Can this thread now moved to the English forum, or did you wanted something different?




You can use that for work with plugins:
[=tc.Name:9-10].[=tc.Name:6-7].[=tc.Name:1-4]

and now since Total Commander 10.00
All placeholders in button bar or start menu like %N, %P now support substring fields in the form :~start,end,
e.g. %N:~2,5 (5 characters from the second) or %N:~-8,5 (5 from the 8-last)




Help wrote:
All parameters now support substring fields in the form :~start,length, e.g. %N:~2,5 or %N:~-8,5.
To append a number directly after the length value, use another ~ character, e.g. %N:~2,5~2.
Negative values are measured from the end of the string.
Example: %P:~0,-1 cuts off the backslash from the path.




 
igarny
Junior Member
Junior Member
Posts: 74
Joined: 2023-01-26, 19:01 UTC

Re: manipulation of variables within TC

Post by *igarny »

Thanks @White

Sure this suggestion can be moved
to the English forum,
Thanks for the hint!
Regex would have been better :mrgreen: , but anyways.
Post Reply