You are not logged in.
Pages: 1
Hi (again),
I've another request if I may.
I'd like to be able to insert a dash ("-") following numbers where there isn't already one.
For example:
01.track1.mp3
02 - track 2.mp3
03 track 4.mp3
20 track 20.mp3
track25.mp3
Should become:
01-.track1.mp3
02 - track 2.mp3
03- track 4.mp3
20- track 20.mp3
track25.mp3
So in other words:
- if a filename doesn't start with numbers, ignore it
- if the next character after the digits end is not a -, or a <space>- then add a dash after the number
I may be asking a bit much here, not sure it's possible, but here's hoping!
Many thanks
Offline
Oh it's possible all right, don't you have doubts re. that! If not with RegEx (I'm sure one of our resident RegEx experts will be along to confirm soon
), then most anything can be accomplished with a custom PascalScript. That's what makes ReNamer so powerful and almost infinitely extensible.
P.S. Came close with RegEx but bumped against the limits of my knowledge, so I'm sure PascalScript can be avoided in this case as well.
Offline
Using RegEx rule:
Expression: ^(\d+)[\s\-\.]*(.*)$
Replace: $1 - $2
Input:
01.track1.mp3
02 - track 2.mp3
03 track 4.mp3
20 track 20.mp3
track25.mp3
Output:
01 - track1.mp3
02 - track 2.mp3
03 - track 4.mp3
20 - track 20.mp3
track25.mp3
Offline
Now that's just awesome ... thanks very much indeed for the help!
Offline
LoL! When I said I "came close", Denis' output was exactly what I got, but I didn't paste it here 'cos it didn't exactly match the output you'd mentioned. Oh well!
Offline
It was actually what I wanted, I just thought it'd be so hard I didn't ask for it :-)
I've got 24 rules in total that run (I'm sure I could cut it down if I were clever about it) .. and mostly my files are coming out fantastically now!
Offline
My two cent
Using RegEx rule:
Expression: ^(\d+)\W*(.+)
Replace: $1 - $2
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
Pages: 1