Automating photo-imports

tigrr

Registered
I would like to find some way of automatically copying my photos from my memory card on to the Finder desktop instead of doing this manually each time. I believe "Automator" is the way to go, but it all looks awfully complicated and I have no idea where to start.
This is the manual work-procedure I want to make the computer automatically do for me:

- I insert the (Compact Flash) card into my card reader, which pops up an "EOS_DIGITAL" disk icon on my desktop. It contains a single folder ("DCIM") which I copy over to my desktop.

- The "DCIM" folder contains at least one sub-folder, but usually several. Depending on my camera setting these sub-folders may all be .JPG files or a mix of .CR2 (Canon RAW) and .JPG or just .CR2 files.
At this stage I want to extract all the image files from each folder into one place, then create a "Canon RAW folder and a "Canon JPG" folder. Finally I want the correct type of files to be put in the correct folder (".CR2" files into the "Canon RAW" folder and ".JPG" files into the "Canon JPG" folder).
The (now) empty folders ("DCIM" and the individual sub-folder(s)) should be deleted and when the whole process is done the CF memory-card should be ejected with a message saying that I can remove the CF memory-card.

Is there a way to easily do this?

The reason I want to copy the files over to the desktop before importing them into iPhoto is because (a) i find iPhoto to be very "fragile" and crashes easily, which causes a havoc when in the midst of importing lots of images -in that case I prefer importing a separate image folder than trying to recover the photos all over the place,
and (b) I used to import both JPG and RAW images into iPhoto, but that caused a whole lot of trouble (and not to mention the enormous space it needed), so now I have two separate libraries: one for JPG images and a separate one for RAW images (I use "Iphoto buddy" for this).
 
You could ...

01. Select and copy the lines of code below.

set {tDisk, cr2_Ext, jpg_Ext} to {"EOS_DIGITAL", "CR2", "JPG"}

property hFolder : (POSIX path of (path to home folder) as string)

tell application "Finder"

if ((name of disks) contains tDisk) then
set tDisks to disks

repeat with i in tDisks
if (((name of i) as string) is tDisk) then
set nFolder to (hFolder & ("Desktop/" & tDisk & "/" & (do shell script "date +%Y%m%d_%H%M%S_DCIM/")))

do shell script ("mkdir -p " & nFolder & "; cp /Volumes/" & tDisk & "/DCIM/* " & nFolder)

set tFolder to ((POSIX file nFolder) as string)
try
set cr2_Files to (every file of entire contents of folder tFolder whose name extension is cr2_Ext)
do shell script ("mkdir -p " & nFolder & cr2_Ext)
move cr2_Files to folder (tFolder & cr2_Ext)
end try

try
set jpg_Files to (every file of entire contents of folder tFolder whose name extension is jpg_Ext)
do shell script ("mkdir -p " & nFolder & jpg_Ext)
move jpg_Files to folder (tFolder & jpg_Ext)
end try
end if
end repeat
end if

end tell

02. Launch 'Script Editor.app' (in the '/Applications/AppleScript/' folder).
03. Perform a 'paste' - 'Script Editor's 'Edit, Paste' menu item ('Command V'), into the 'Untitled' window's upper panel.
04. Perform a 'save' - 'Script Editor's 'File, Save' menu item ('Command S') - making sure to select 'Application' from the 'File Format:' popup menu, and navigating to where to save the applet.
05. Launch 'Image Capture.app' (in the '/Applications/' folder).
06. Via 'Image Capture's 'Image Capture, Preferences...' menu item's windows' 'Genera' tabs' 'Camera:'s 'When a camera is connected, open:' popup menu - select 'Other...', which present a drop down navigation sheet.
07. Navigate to, and select, the saved applet of Step 04. above.
08. Click on the drop down sheets' 'Open' button.
09. Click on the 'Image Capture Preferences' window's 'OK' button.
10. Quit 'Image Capture'.
11. Connect the camera. If all is well, a 'EOS_DIGITAl' folder will appear on the 'Desktop'; which contains dated (and timed) 'CR2' and 'JPG' folders - each containing copies of the camera's files.

Any problems encountered or desired changes are left as an exercise for the student.
 
Back
Top