Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

hana

macrumors regular
Original poster
May 23, 2003
169
0
Los Angeles
Tonight I had some files I shot in raw format. The files were imported to iphoto. I didn't want to spend too much time editing (I'd usually run them through elements and such) so I just did the iphoto enhance editing thing.

When I exported the files from iphoto into a desktop folder, the naming scheme looked like:

img_001.cr2.jpg

Before uploading them to snapfish or some other site I had to go into finder and rename them so they would look more normal like

img_001.jpg

Is there an easier way to do this?

Thanks,
 

Mitthrawnuruodo

Moderator emeritus
Mar 10, 2004
14,558
1,323
Bergen, Norway
You should be able to do something like that with Batch Change (from the Photo menu) in iPhoto...

...but you migh get better control if you export them and then use Automator to batch change the filenames with a workflow looking something like this, maybe:

Picture 1.png
 

FritzTheWonderM

macrumors member
Dec 12, 2003
93
0
Planet 10
There is an Applscript in the Library > Scripts > Finder Scripts folder called Replace Text in Item Names.scpt that will do what you want. You need to have the files in the front most Finder window, and have the window in list view.
 

ChrisA

macrumors G5
Jan 5, 2006
12,828
2,033
Redondo Beach, California
hana said:
the naming scheme looked like:
img_001.cr2.jpg

...rename them so they would look more normal like

img_001.jpg

First off, Why? I mean unless you are going to rename them with names like "Mark and Sue's New Bady" who cares if the name is "img_023.jpg or "qsdc_we.fverg.jpg"?

OK assumming you do want to change them, go to the terminal window and read the "basename" man page.
Next lookup the "for" command.

The command "basename foo.bar .bar" will return "foo"

If you type these four lines into the shell it will do what yu want
for f in *.cr2.jpg
do
mv $f `basename $f .cr2.jpg`.jpg
done

The above will stip the characters ".cr2.jpg" from every filename that ends with ".cr2.jpg" and then append the four charaters ".jpg".

It's worth learning a few shell commands. If you save the above in a file then you will have a simple script that yu can use next time
 

j26

macrumors 68000
Mar 30, 2005
1,730
640
Paddyland
Simplest thing is Batch Change the title before export. I'm in the process of doing that while archiving photos on an external HD so I can easily find what I'm looking for in the archive.

When exporting select to use the title as the filename.
 

Abstract

macrumors Penryn
Dec 27, 2002
24,868
898
Location Location Location
I upload my photos to a folder on my desktop via Image Capture (rather than iPhoto or anything else), rename the folder in this format: YEAR-MONTH-DAY - Event Name. I usually date things Day-Month-Year, but for organization purposes, Y-M-D is the best. After that, I use an Automator Script I wrote to batch rename files. That script sits in my Dock alongside another script for batch resizing photos.

Then I import into iPhoto.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.