multiple file names

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
giovanigonzales
Junior Member
Junior Member
Posts: 2
Joined: 2007-08-27, 21:35 UTC

multiple file names

Post by *giovanigonzales »

Hello everybody,
I need a plugin or a way to solve my problem.
I have in a directory some movies:
- movie1 (2003).avi
- movie2 (2000).avi
- movie3 (2001).avi
Now, I would like to find a very easy way to switch to sorting them by the year:
- movie2 (2000).avi
- movie3 (2001).avi
- movie1 (2003).avi

My problem would be solvable if:
1. The files would have 2 names (second names can be stored in an XML). Second names would be:
- (2000) movie2.avi
- (2001) movie3.avi
- (2003) movie1.avi
and then I would need a plugin to sort files by the second name
2. Defining a column to swap the year with the name
In the "customs column view" I cant find an option to use any functions like substr(name,index("(",name),6)
where substr(string,index,count) would return the substring counting "count" characters starting from "index"
and index(susbstr,string) would return the index of "substr" into "string"

I think a plugin for this would be better than defining a new column - which I dont have much space for.
By the way, anyone knows if there are filesystems that suport multiple file names? (and I'm not talking about symbolic links) where the second, third, etc names would be stored into the file alocation table or into a XML, one XML for each folder
Or its just me a weirdo that I fantasize too much? :)
User avatar
tbeu
Power Member
Power Member
Posts: 1354
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

Your second suggestion can be done with RegExp WDX and regular expression

Code: Select all

Find="(\w+)\s\((\d+)\)\.(\w+)"
Change="\($2\) $1\.$3"
tbeu
Last edited by tbeu on 2007-08-28, 09:47 UTC, edited 1 time in total.
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
RID500
Member
Member
Posts: 194
Joined: 2006-11-20, 12:38 UTC

Post by *RID500 »

> - movie1 (2003).avi

User defined columns: (is this the right term? I have nothing found in the wiki.)

Create an user defined view with [=tc.Name:-5,]
This gives you an new sortable column with e.g. 2000), 2001), 2003),...
if the year is really always at the end of the file name.

---

Found at:
http://www.ghisler.ch/board/viewtopic.php?p=65424#65424

Syntax:
From char 8 till the end:
[=tc.Name:8-]

From char 5 from the back till the end
[=tc.Name:-5,]
/join #TCMD Chat at irc.freenode.net - Today's newbies are tomorrow's experts.
User avatar
tbeu
Power Member
Power Member
Posts: 1354
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

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
RID500
Member
Member
Posts: 194
Joined: 2006-11-20, 12:38 UTC

Post by *RID500 »

I *think* they are sorted, but i am not looking correctly, sorry.
Thanks tbeu, now i understand.
/join #TCMD Chat at irc.freenode.net - Today's newbies are tomorrow's experts.
giovanigonzales
Junior Member
Junior Member
Posts: 2
Joined: 2007-08-27, 21:35 UTC

thanks

Post by *giovanigonzales »

thank you, the RegExp WDX works fine

I meant "custom column view" of course.

just in case anyone needs the same thing - I paste my final regexp.ini:
[Regexp]
Rule=Movies

[Movies]
Find="(.+) \((\d+)\)\.(\w+)"
Change="\($2\) $1\.$3"
Substitute=1

Maybe future versions of TC will enable sorting by substrings then the plugin wont even be necesary.

good day to you all
Post Reply