Filename into fixed pattern + parameters from that filename

Javascript renaming examples. Javascript renaming is supported in version 3 or newer.

Filename into fixed pattern + parameters from that filename

Postby zbigg » Sat Jun 30, 2018 7:11 pm

Hello,
I am new to the app and this forum so hello everybody )) !
I have not learned JS yet yet BR seem best option to speed up some dummy actions.
After some preliminary RAW processing I get simple-named photoshop files, eg: 10A, 11B, 4D etc where number is a NUMBER and a letter is a LETTER -> <NUMBER><LETTER>.psd
What I would like to try is to set some fixed prefix + fixedpart+NUMBER+fixedpart+NUMBER+LETTER.
Some non important interpunction characters in between.
eg XXXXXX-YYYY-NUMBER_YYYY-NUMBER_ZZ-NUMBER_LETTER

so actually need to extract a number and a letter from the filename and use them separately as parameters within the new filename.

Any suggestion how to approach BR syntax highly appreciated ))


cheers,
zbigg
 
Posts: 2
Joined: Sat Jun 30, 2018 6:55 pm

Re: Filename into fixed pattern + parameters from that filename

Postby zbigg » Mon Jul 02, 2018 2:33 pm

Seriously nobody?
How to use parts of existing filename and compose a new filename plus some fixed additions?
zbigg
 
Posts: 2
Joined: Sat Jun 30, 2018 6:55 pm

Re: Filename into fixed pattern + parameters from that filename

Postby Admin » Tue Jul 03, 2018 5:18 am

Hi , is the initial file name always:

[1-9][1-9][A-Z]

that is two single digits numbers followed by a single letter?

Also

fixedprefix + fixedpart1 + NUMBER + fixedpart1 + NUMBER + LETTER

are fixedprefix , fixedpart1 , fixedpart2 always the same?

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

Re: Filename into fixed pattern + parameters from that filename

Postby Admin » Tue Jul 03, 2018 5:19 am

PS you will need a commercial license to use Javascript in BRU.
Admin
Site Admin
 
Posts: 1895
Joined: Tue Mar 08, 2005 8:39 pm


Return to Javascript Renaming