Become a MacRumors Supporter for $25/year with no ads, private forums, and more!

How do I batch-rename multiple files like this: "D2018.1, D2018.2, D2018.3..."?

Nickk

macrumors newbie
Original poster
Apr 24, 2014
22
1
I’ve got 10 thousand pictures to rename.

They are titled like this now: "46gibberish, 47gibberish, 48gibberish...".


How do I batch-rename the files into something like this: "D2018.1, D2018.2, D2018.3..."?

Am I right that this way they will still open in chronological order?

Also, it would be great to automatically sort them into a hundred folders.

I’m not going to purchase any applications for this task.


So far, I've googled only the following means:

It’s when original "46gibberish, 47gibberish, 48gibberish..."

become:

"46gibberish.1, 47gibberish.2, 48gibberish.3...".
 

sahnert

macrumors 6502
Oct 20, 2003
443
22
Seattle
I’ve got 10 thousand pictures to rename.

They are titled like this now: "46gibberish, 47gibberish, 48gibberish...".


How do I batch-rename the files into something like this: "D2018.1, D2018.2, D2018.3..."?

Have you looked at the options in Finder under File>Rename...? If I select a group of files and choose this option I can create a custom format similar to what you are looking for, although the syntax might be slightly different.

I suggest using a character other than the period, like a space or dash before the incremented number since traditional file systems reserved the period to begin the file extensions (.jpg for example).
 
Comment

Toutou

macrumors 6502a
Jan 6, 2015
697
982
Prague, Czech Republic
Sounds like a job for a few lines of bash (the Terminal thingie), but you'd need to provide precise instructions for someone to be able to write it for you.
 
  • Like
Reactions: Nickk
Comment

whooleytoo

macrumors 604
Aug 2, 2002
6,583
668
Cork, Ireland.
Have you looked at the options in Finder under File>Rename...? If I select a group of files and choose this option I can create a custom format similar to what you are looking for, although the syntax might be slightly different.

Wow. I've been using Macs since the System 6 days, and needed this, and didn't know this feature existed. (I'm sure it was only added recently.... )
 
  • Like
Reactions: Nickk and sahnert
Comment

Nickk

macrumors newbie
Original poster
Apr 24, 2014
22
1
Have you looked at the options in Finder under File>Rename...? If I select a group of files and choose this option I can create a custom format similar to what you are looking for.

Yes, I have. That's why I stated the corresponding thread tags.

But I don't see how to rename the way I've stated above. The Finder seems to offer either concatenation or renaming the only one string. But my files are all have a unique title.

I will use "your" dashes instead of "my" dots.
 
Comment

Septercius

macrumors member
Oct 5, 2017
48
70
UK
Automator has a batch rename task. Start off your workflow with a 'Get Specified Finder Items' task (or similar) and then add a 'Rename Finder Items' task. It lets you change text, add a sequence number and so on.
 
  • Like
Reactions: Nickk and sahnert
Comment

sahnert

macrumors 6502
Oct 20, 2003
443
22
Seattle
Yes, I have. That's why I stated the corresponding thread tags.

But I don't see how to rename the way I've stated above. The Finder seems to offer either concatenation or renaming the only one string. But my files are all have a unique title.

I will use "your" dashes instead of "my" dots.

I might be misunderstanding exactly what you need, but I was able to rename four test files as D2018-1, D2018-2, D2018-3, D2018-4 by selecting them all and using the following steps in File>Rename

1. Choose Format (instead of Replace Text or Add Text
2. Name Format > Name and Index
3. Custom Format: D2018-
4. Where > after name
5. Starts number at: 1


Screen Shot 2019-02-13 at 9.47.36 AM.png
Screen Shot 2019-02-13 at 9.45.26 AM.png
 
  • Like
Reactions: Nickk
Comment

Nickk

macrumors newbie
Original poster
Apr 24, 2014
22
1
I was able to rename

Your way turned out the right way, thank you!
[doublepost=1550135165][/doublepost]The only one item in my wish-list is automatic packing the pix into a hundred folders.
 
  • Like
Reactions: sahnert
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.