[Help!] Rename by deleting all letters before a chain of letters

Advanced Renamer forum
#1 : 11/09-13 12:51
slimen
slimen
Posts: 1
Hi,

I need to rename files like this :

white-JN1500
black-JN1200

to this :

JN1500
JN1200

So i have to find a script to delete all characters before "-JN"
Do you have a method for this ?




11/09-13 12:51
#2 : 11/09-13 21:03
Stefan
Stefan
Posts: 274
Reply to #1:


> delete all characters before "-JN"


You can always use Regular Expressions to
keep everything starting at "-JN" till the end:


Use Replace rule

Find: ^.+(-JN.+)$
Repl: \1
Occ: All
[X]Case
[X] RegEx
Apply: Name




Or, to make it more clear:

Find: ^(.+)(-JN.+)$
Repl: \2
Occ: All
[X]Case
[X] RegEx
Apply: Name




.


11/09-13 21:03
#3 : 12/09-13 12:09
slimen
slimen
Posts: 2
Reply to #2:

Thanks Stephan but i'm a noob !
I tried to copy/past the script in the script method but it does not work...
Could you please explain me how to apply this script ?


12/09-13 12:09
#4 : 12/09-13 19:53
Stefan
Stefan
Posts: 274
Reply to #3:

That is not a script.

Quote Stefan:
Use a Replace rule.


Or like it's called here for AdvRen:
Use the "Replace" Methode.





Perhaps you should take half a hour and read the User Guide (see link above)





.


12/09-13 19:53
#5 : 13/09-13 10:35
slimen
slimen
Posts: 2
Reply to #4:

Stefan, OK it works !
Thanks a lot :)


13/09-13 10:35