[MRT] complex file renaming tasks (me dumb, need help!)

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Ronny Pries
Junior Member
Junior Member
Posts: 6
Joined: 2006-11-13, 11:44 UTC
Location: germany

[MRT] complex file renaming tasks (me dumb, need help!)

Post by *Ronny Pries »

Hello dear TC specialists,

i've been in love with the MRT for a long time now already but i think i recently hit one of its limits. I've got a nice collection of recorded mp3s which folders currently look like this

Robert_Armani-Classic-(DM173)-1996
Dj_Deeon-Freak_Like_Me-(DM185)-1997

etc... and i'd like to move the catalog numbers (whatever in the brackets, varying from release to release) to the beginning of the folder

[DM173]_Robert_Armani-Classic-1996
[DM185]_Dj_Deeon-Freak_Like_Me-1997

within a batch job. I read the manual forth and back but i seem unable to figure out how to achieve this. Could anyone at least tell me wether its theoretically possible with Total Commanders MRT or not? I'm under the impression that it might work somehow...

Thanks for your help in advance!

Ronny
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2Ronny Pries
Hi and welcome! I assume your Task should be no problem with regular expressions. Unfortunately I don't speak RegEx, but I'm sure one of the RegEx-Gurus here can answer your question. Just stay tuned :)
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

Maybe try something like this:

Search for:
(.*)\((.*)\)-

Replace with:
[$2]_$1

Of course RegEx on.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
Ronny Pries
Junior Member
Junior Member
Posts: 6
Joined: 2006-11-13, 11:44 UTC
Location: germany

Post by *Ronny Pries »

Hey djk,

that's really it!!!! Thanks a billion times, what a timesaver!

Ronny
User avatar
deus-ex
Power Member
Power Member
Posts: 969
Joined: 2003-02-10, 17:45 UTC

Post by *deus-ex »

2Ronny Pries
At least i get an opportunity to give you something in return for your marvelous tune for one of my alltime favorite productions: FR-019 Poem to a Horse. :P

Here's the deal. Paste following into field "Rename mask: file name", leaving every other setting at default:

Code: Select all

[[N-11,5]]_[N1--13][N-4-]

EDIT: Ok, now you got two roads to reach the destination. :)
_______
Regards,
deus-ex
Ronny Pries
Junior Member
Junior Member
Posts: 6
Joined: 2006-11-13, 11:44 UTC
Location: germany

Post by *Ronny Pries »

deus-ex wrote:2Ronny Pries
At least i get an opportunity to give you something in return for your marvelous tune for one of my alltime favorite productions: FR-019 Poem to a Horse. :P
Thank you very much! :D
deus ex wrote:Here's the deal. Paste following into field "Rename mask: file name", leaving every other setting at default:

Code: Select all

[[N-11,5]]_[N1--13][N-4-]
EDIT: Ok, now you got two roads to reach the destination. :)
Hey cool, that works just as fine. I still have no idea how more advanced regular expressions work - is there some kind of "reg ex 4 dummies" somewhere?

Ronny
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

Ronny Pries wrote:Hey cool, that works just as fine. I still have no idea how more advanced regular expressions work - is there some kind of "reg ex 4 dummies" somewhere?

Ronny
I've started here. It's help for email checker program but some basic rules of RegEx are very good explained.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
deus-ex
Power Member
Power Member
Posts: 969
Joined: 2003-02-10, 17:45 UTC

Post by *deus-ex »

Ronny Pries wrote:I still have no idea how more advanced regular expressions work - is there some kind of "reg ex 4 dummies" somewhere?
Did you check TCs online help already? There's a section available covering Regular expressions. I can provide you with a CHM-compile of TCs helpfile which is a lot nicer to read and work with, if you are interested. Just click on the email-button in my post to get in touch.

And a few links to start with:
http://ww.regular-expressions.info
http://en.wikipedia.org/wiki/Regular_expression
http://de.wikipedia.org/wiki/Regulärer_Ausdruck

_______
Regards,
deus-ex
User avatar
ArchCarrier
Junior Member
Junior Member
Posts: 33
Joined: 2005-06-06, 12:53 UTC
Location: Brussels, Belgium

Post by *ArchCarrier »

Also, a very helpful tool for quickly creating complex regular expressions is Regex Buddy.
Ronny Pries
Junior Member
Junior Member
Posts: 6
Joined: 2006-11-13, 11:44 UTC
Location: germany

Post by *Ronny Pries »

hi everybody,

thanks for the input. i finally got a little deeper into the stuff (learning by doing).

btw, is there a way to separate several rules like | without using regexp ?

ronny
Post Reply