Need help with renaming files - add info to file name

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Need help with renaming files - add info to file name

Postby fjon » Fri Feb 10, 2017 3:27 pm

I am trying to figure out how I can rename a big batch of files in a certain format, and I've only managed to get about half the information needed.

The files I have are in format:

12345678.txt

and the desired format is:

ABC.12345678.20170210.TE6578.01.10.txt

ABC will always be the same so I was able to add this
12345678 is the existing file name
20170210 is today's date in YYYYMMDD format. I was able to add this
TE6578 will be the same for each batch of files I want to rename.
01.10 = file 01 of 10. Second file should be 02.10 and so on

I am having trouble adding the last two components, i.e TE6578 and 01.10.

I was wondering if someone could give me some guidance on how to accomplish this?
Thanks in advance.
fjon
 
Posts: 3
Joined: Fri Feb 10, 2017 3:21 pm

Re: Need help with renaming files

Postby Emerkamp » Sat Feb 11, 2017 5:30 am

Hello:

TE6578
Add (7)
Suffix=.TE6578.

01.10
Numbering (10)
Mode=Suffix
Padding=2

You'll need to do this after you've added the date to the end since bru, "Adds things In the same order as the options panel."
So add a counter as a place holder when adding your date so their's no name conflicts, Then remove it when running the step above.

As far as adding the total amount of files. You can check for the total along the bottom window and run bru using Add (7) again. as Final step
Emerkamp
 
Posts: 140
Joined: Sat Aug 23, 2014 2:35 pm

Re: Need help with renaming files - add info to file name

Postby fjon » Mon Feb 13, 2017 9:16 am

Many thanks. So it looks like this needs to be done in a few steps, which is fine. I was hoping it could be done in one step, but that's no big deal.
fjon
 
Posts: 3
Joined: Fri Feb 10, 2017 3:21 pm

Re: Need help with renaming files - add info to file name

Postby Emerkamp » Mon Feb 13, 2017 7:28 pm

fjon wrote:Many thanks. So it looks like this needs to be done in a few steps, which is fine. I was hoping it could be done in one step, but that's no big deal.

Yes, Afraid so.
My way involves 3 steps.
You might cut this down to 2 steps by just adding all your strings to the name. Then use RegEx to rearrange the strings to how you want them.

I just weigh out the time it takes to think of clever tricks or more use of steps and pick the quicker method.
Emerkamp
 
Posts: 140
Joined: Sat Aug 23, 2014 2:35 pm

Re: Need help with renaming files - add info to file name

Postby fjon » Mon Feb 13, 2017 8:40 pm

Yeah, no big deal having to run it 2 or 3 times, certainly preferable to manually changing dozens or hundreds of filenames!
fjon
 
Posts: 3
Joined: Fri Feb 10, 2017 3:21 pm

Re: Need help with renaming files - add info to file name

Postby Admin » Tue Feb 14, 2017 12:16 am

You can save each step in a file .BRU with "save as" (step 1 , step 2 etc) and then open them when you need it.
Alternatively you can do everything with a Javascript script, see special (14), but that requires a bit of coding, thanks
Admin
Site Admin
 
Posts: 2344
Joined: Tue Mar 08, 2005 8:39 pm


Return to BRU Support