#1 2006-06-06 13:32

revan
Member
Registered: 2006-06-06
Posts: 2

Help with renamer please

I have a lot of files of format "Name XXX [0001].jpg" and want to rename them with "0001 - Name XXX.jpg" (the names are different from each others and i want to maintain that) and so on but i can't understand if this could be done with this (very nice) program and what rules to apply.
Any suggestion, please? smile

Offline

#2 2006-06-06 15:03

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,379

Re: Help with renamer please

You can do that in two different ways: using RegEx rule, and using PascalScript rule.
I'll explain the first one... Add RegEx rule and set it up like here:

Expression: ([^\[]*) (.*)
Replace: $2 - $1

I have tested it with "Name XXX [0001].jpg" and it produces "[0001] - Name XXX.jpg",
after applying the RegEx rule. So the last thing you need to do is to strip the [] brackets.
And don't forget to skip extension in the RegEx rule smile

Offline

#3 2006-06-06 15:09

revan
Member
Registered: 2006-06-06
Posts: 2

Re: Help with renamer please

It Works!!! yikes
Thank you very much!!! smile

Offline

#4 2008-02-27 22:10

krtek
Senior Member
From: Łódź (Poland)
Registered: 2008-02-21
Posts: 262

Re: Help with renamer please

If we would like to do the task in one step RegEx should be like that:

Expression: (.+)\[(.+)\]
Replace: $2 - $1


Or that:
Expression: (.+)\[(\d+)\]
Replace: $2 - $1
if it's important to check if there are only digits in the square brackets.


Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).

Offline

Board footer

Powered by FluxBB