How to rename according to a loop or pattern ?

A swapping-ground for Regular Expression syntax

How to rename according to a loop or pattern ?

Postby stephaud » Tue Jan 31, 2017 4:24 pm

Hi !
First of all i'm new to RegEx and english is not my language ! So be indulgent...

Well, i would like to rename a bunch of files like this :
what i have > tile_00001.jpg, tile_00002.jpg... up to tile_00153.jpg
renamed in > tile_x=001&y=001.jpg, tile_x=001&y=002.jpg... up to tile_x=001&y=153.jpg
AND After that
tile_00154.jpg, tile_00155.jpg... up to tile_00306.jpg
renamed in > tile_x=002&y=001.jpg, tile_x=002&y=002.jpg... up to tile_x=002&y=153.jpg
AND so on... (every 153 th)

In another way to say it, i want :
X=001 and Y=001....to.... Y=153
and
X=002 and Y=001...to...Y=153
and
X=003 and Y=001...to...Y=153
and so on...

Does someone can help me ?
Thanks.
stephaud
 
Posts: 7
Joined: Tue Jan 31, 2017 3:51 pm

Re: How to rename according to a loop or pattern ?

Postby Admin » Wed Feb 01, 2017 12:01 am

I think you will need a Javascript function to automate that (see Special 14 section in BRU).
Admin
Site Admin
 
Posts: 1521
Joined: Tue Mar 08, 2005 8:39 pm

Re: How to rename according to a loop or pattern ?

Postby stephaud » Wed Feb 01, 2017 11:47 am

Ok thanks !
...but i've no skill into javascript... :(
stephaud
 
Posts: 7
Joined: Tue Jan 31, 2017 3:51 pm

Re: How to rename according to a loop or pattern ?

Postby JMM » Fri Feb 03, 2017 8:25 pm

Contact me at jmm[at]eligeotravez[dot]net if you need further help for this specific task.
JMM
 
Posts: 29
Joined: Sat Jan 25, 2014 12:12 pm

Re: How to rename according to a loop or pattern ?

Postby Admin » Mon Feb 06, 2017 2:29 am

Admin
Site Admin
 
Posts: 1521
Joined: Tue Mar 08, 2005 8:39 pm


Return to Regular Expressions