Looking for Filename Substring wdx

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Looking for Filename Substring wdx

Post by *JohnFredC »

Can anyone point me to a content plugin that would allow me to extract characters from the file name using a substring function?

I could write something like that myself but don't have the time to devote to another project just now.

Thanks for any help!
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

If you want to cut out a substring by start and end position you can already do this:

Code: Select all

tc.Name:3-4
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

Thank you! Didn't know that!

Edit...

Well, the substring function works great, but the resulting column doesn't sort the way I expected.

Looks like the sorting of that column is still based on the filename itself, not the substring value. Too bad. In this particular situation for various reasons it's not feasible to rename the files and the file dates themselves do not reflect the file contents.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
tbeu
Power Member
Power Member
Posts: 1354
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

JohnFredC wrote:Well, the substring function works great, but the resulting column doesn't sort the way I expected.
Confirmed in TC7RC5. I would consider this as a bug.
You might use the RegEx WDX instead which does a correct sorting.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Currently it's not supported to sort by substrings, sorry.
Author of Total Commander
https://www.ghisler.com
Post Reply