Photo renumbering in bulk - changing dashes to underscores
June 2, 2013 7:21 AM   Subscribe

Need to do it in bulk...

The photos we take for two related, but different, platforms for our business needs require two different formats as follows:

One is: 1-1, 1-2, 1-3 followed by the next set, 2-1, 2-2, 2-3 etc.

And the other is underscore: 1_1, 1_2, 1_3 etc.

I am looking for a program that allows me to replace all dashes with underscores for an entire folder of images. That way we can number our images with dashes, then run the program and have it replace dashes with underscores.

Anyone know a program like this? Thanks!
posted by Salvatorparadise to Computers & Internet (22 answers total) 6 users marked this as a favorite
What operating system are you using?
posted by hoyland at 7:23 AM on June 2, 2013

For OSX, I use Better Rename. What you want to do is probably relatively easy to do with a bash script, but a good file renamer is a handy tool to have around anyway.
posted by nightwood at 7:32 AM on June 2, 2013 [2 favorites]

Response by poster: Windows Vista
posted by Salvatorparadise at 7:33 AM on June 2, 2013

posted by davebush at 7:45 AM on June 2, 2013

Also on OS X - Name Mangler.
posted by Grangousier at 7:53 AM on June 2, 2013 [1 favorite]

I use Irfanview all the time for bulk conversion. I'd not done this before but it's easily doable (just tried it).

File--batch convert ---> add all files from folder ---> [save as text] ---> simply find/replace _ for - and save that .txt, return to Irfanview and [load text] and it autmagically makes all the changes----> hit 'start batch' and the changes go through to the images in the original folder.

The writing of this takes much longer than the process.
posted by peacay at 7:54 AM on June 2, 2013 [6 favorites]

I use StExBar, which has a number of useful small utilities for windows explorer in addition to an easy rename ability (which even supports regex! If you ever need more complex renaming).
posted by caesura at 8:01 AM on June 2, 2013 [1 favorite]

Bulk Rename Utility

Bulk Rename Utility is a free file renaming software for Windows. Bulk Rename Utility allows you to easily rename files and entire folders based upon extremely flexible criteria.
posted by lampshade at 8:12 AM on June 2, 2013 [1 favorite]

I really like Ant Renamer for Windows. It is easy to use and very flexible.
posted by mmascolino at 8:15 AM on June 2, 2013

I wrote a one line powershell script to do just that.
I am on a train, on a phone right now, but it I'll do my best.

Dir | Rename-Item -NewName { $ replace "-","_"}

More ways here
posted by Just this guy, y'know at 9:59 AM on June 2, 2013

Hmmm. I would be tempted to drop to a command prompt - Start Button>>then type "CMD" in the "Search Programs and Files" box. Use the "CD" command to navigate to the directory containing the pictures. Then type (without the quotes) "ren *_* *-*"

That should work.
posted by brownrd at 10:05 AM on June 2, 2013

Bulk Rename Utility works well, but there is a bit of a learning curve to it. But you will be able to exactly do what you want- replace all instances of - with _.

Irfanview should work too, but sometimes it can be unintuitive.

Whatever you choose, test it first for unintended effects before you rename everything, or else you could end up mangling your whole collection's filenames.
posted by gjc at 10:41 AM on June 2, 2013 [1 favorite]

On a Mac, this is trivial to do in Automator, which comes with the OS. E.g., here.
posted by raf at 11:22 AM on June 2, 2013

More props for Name Mangler; I used to use it for just that sort of thing all the time when I hired event photographers.
posted by limeonaire at 11:29 AM on June 2, 2013

i really like bulkrenameutility that lampshade linked to.
posted by misanthropicsarah at 11:41 AM on June 2, 2013

Also like Bulk Rename Utility as well. Very easy to use, does exactly what you need.
posted by radioamy at 11:45 AM on June 2, 2013

Another vote for Bulk Rename Utility, it's the best.
posted by Confess, Fletch at 12:11 PM on June 2, 2013

Then type (without the quotes) "ren *_* *-*"
That should work.
I'm pretty sure that won't work; I don't think the replacement patterns are that smart.
I just tried it on a test set of 1_1.txt, 1_2.txt and got 1_1.txt-, 1_2.txt-.

(As gjc said: whatever you choose, test it first on a scratch directory.)
posted by We had a deal, Kyle at 1:31 PM on June 2, 2013

Also: Bulk Rename Utility is somewhat notorious for having a daunting-looking UI which is actually surprisingly usable:
Bulk Rename Utility would be every bit the nightmare it appears to be, if it weren't for one very sensible move on the programmer's part: The interface shows you, in green, a preview of what your instructions are going to do to whatever files you've selected.
posted by We had a deal, Kyle at 1:35 PM on June 2, 2013

I should clarify now that I am at a real computer.

I am not sure if Vista ships with powershell. If it does, to get there all you need is:
open the run box and type CMD
then powershell to start it up.
Then type in my script as above.

but definitely definitely do it in a test dir first.
posted by Just this guy, y'know at 2:50 AM on June 3, 2013

Oh also,
Having just needed to do this myself again today I notice my script was slightly wrong before

Dir | Rename-Item -NewName { $ "-","_"}

is what it should have read (name-replace needs a dash)

I will now shut up about powershell
posted by Just this guy, y'know at 5:43 AM on June 3, 2013

Response by poster: thank you everyone!
posted by Salvatorparadise at 8:31 AM on June 11, 2013

« Older What should I do with all this bacon fat?   |   Dodging and burning effects in 1950s television? Newer »
This thread is closed to new comments.