Need to Rename and Copy from camera to Mac appending the file with Created Date...

Joined
Nov 30, 2007
Messages
13
Reaction score
1
Points
3
So that's what I would like to do.

New camera creates files with the same name that my old camera did, and therefore when I want to copy the new pictures off the new camera to the mac, I'm going to need to rename them at the same time. Photoshop CS, the version that I have, will do a batch rename and copy, but it won't use the date on which the picture was taken, only the current date.

Any thoughts and least cost preferred...
 
OP
J
Joined
Nov 30, 2007
Messages
13
Reaction score
1
Points
3
Hmmm... I 'think' I can put something together using Automator. So far it looks like it has potential.
 
OP
J
Joined
Nov 30, 2007
Messages
13
Reaction score
1
Points
3
While I was able to have Automator:

1) copy the files to a temp directory.
2) rename the files appending a prefix of the create date
3) move the files to their final destination

it's still not an ideal way of managing photos but will do what I needed it to do. I actually broke down and used ACDSee on my PC to clean up the 8 years of mess that I had. In 1.5 hrs I now have all files renamed as <date><time>.jpg, and sorted into folders by year. The nice thing is that ACDSee is able to use the EXIF Metadata for the "date", not just the modified date on the operating system, which in many cases is not the true creation date. Too bad there are no functions in Automator to access the EXIF data (at least not that I can see).
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
so, just to clarify.. you want it to APPEND the filename with the creation date?

Worst case I'll post a shell script to do that for you. That is if modification time will work for you. I'm not certain how to parse EXIF from a command line.
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
Script to rename JPEGS based on EXIF image creation date.

Okay, download jhead here:
http://www.xs4all.nl/~jlpoutre/BoT/jhead-xml/

Put it in /usr/bin (you'll need to sudo to copy it there, use cp -p to preserve permissions)

Once that's done, save this script someplace. Then chmod 755 the script.

Code:
#!/bin/bash

echo -n "Please enter the directory of your photographs: "
read -e DIRECTORY
cd $DIRECTORY
jhead -ft *.jpg
declare -i number=1
for x in $(ls *.jpg); do
time=$(ls -lo $x | awk '{print $5"_"$6"_"$7}')
mv $x ${x%.jpg}_${time}_${number}.jpg
number+=1
done
unset number

Sample output.
Code:
dyn9011158144:test1 mike$ ls
Thumbs.db		flowers_0012.jpg	flowers_0021.jpg	flowers_0028.jpg	flowers_0035.jpg	flowers_0039.jpg
flowers_0001.jpg	flowers_0015.jpg	flowers_0022.jpg	flowers_0029.jpg	flowers_0036-1.jpg	flowers_0040.jpg
flowers_0002.jpg	flowers_0016.jpg	flowers_0023.jpg	flowers_0030.jpg	flowers_0036-2.jpg	flowers_0041.jpg
flowers_0003.jpg	flowers_0017.jpg	flowers_0024.jpg	flowers_0031.jpg	flowers_0036.jpg	flowers_0042.jpg
flowers_0004-2.jpg	flowers_0018.jpg	flowers_0025.jpg	flowers_0032.jpg	flowers_0037.jpg	flowers_0043.jpg
flowers_0004.jpg	flowers_0019.jpg	flowers_0026.jpg	flowers_0033.jpg	flowers_0038-2.jpg
flowers_0011.jpg	flowers_0020.jpg	flowers_0027.jpg	flowers_0034.jpg	flowers_0038.jpg

dyn9011158144:scripts mike$ ./PhotoRename 
Please enter the directory of your photographs: /Users/mike/test1
flowers_0001.jpg
flowers_0002.jpg
flowers_0003.jpg
flowers_0004-2.jpg
flowers_0004.jpg
flowers_0011.jpg
flowers_0012.jpg
flowers_0015.jpg
flowers_0016.jpg
<clip, too long..>

dyn9011158144:test1 mike$ ls
Thumbs.db				flowers_0021_May_20_12:39_14.jpg	flowers_0035_May_20_12:44_28.jpg
flowers_0001_May_20_09:51_1.jpg		flowers_0022_May_20_12:40_15.jpg	flowers_0036-1_May_20_12:47_29.jpg
flowers_0002_May_20_09:51_2.jpg		flowers_0023_May_20_12:40_16.jpg	flowers_0036-2_May_20_12:47_30.jpg
flowers_0003_May_20_09:52_3.jpg		flowers_0024_May_20_12:40_17.jpg	flowers_0036_May_20_12:47_31.jpg
flowers_0004-2_May_20_09:52_4.jpg	flowers_0025_May_20_12:40_18.jpg	flowers_0037_May_20_12:47_32.jpg
flowers_0004_May_20_09:52_5.jpg		flowers_0026_May_20_12:41_19.jpg	flowers_0038-2_May_20_12:48_33.jpg
flowers_0011_May_20_12:38_6.jpg		flowers_0027_May_20_12:41_20.jpg	flowers_0038_May_20_12:48_34.jpg
flowers_0012_May_20_12:38_7.jpg		flowers_0028_May_20_12:43_21.jpg	flowers_0039_May_20_12:48_35.jpg
flowers_0015_May_20_12:38_8.jpg		flowers_0029_May_20_12:43_22.jpg	flowers_0040_May_20_12:48_36.jpg
flowers_0016_May_20_12:38_9.jpg		flowers_0030_May_20_12:43_23.jpg	flowers_0041_May_20_12:49_37.jpg
flowers_0017_May_20_12:39_10.jpg	flowers_0031_May_20_12:43_24.jpg	flowers_0042_May_20_12:54_38.jpg
flowers_0018_May_20_12:39_11.jpg	flowers_0032_May_20_12:44_25.jpg	flowers_0043_May_20_12:54_39.jpg
flowers_0019_May_20_12:39_12.jpg	flowers_0033_May_20_12:44_26.jpg
flowers_0020_May_20_12:39_13.jpg	flowers_0034_May_20_12:44_27.jpg


Now to find a tool that'll read NEF.... and I'll be all happy.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top