multiple card downloads w/image capture


I have 4 card readers and I use image capture to auto download when a card is inserted.
What I’d like to know is how the phrase a script or automation to run a script when ALL the cards are done downloading.



That probably very easy, back in a sec…

Did I say easy :confused:

Ok I can not test this with card readers but it works with my camera
It may be what you want…

Write you script and save it as an App.
The app MUST be saved as a stay open.

and you Must surround it with an on idle handler
Don’t ask me why but this was the only way I could get the script to run.

in ImageCapture you have an option to run Automatic Task, this is run after download is completed.

Use this to select your app.

example of app.
the do shell will quit the app when done.

property appName : ""

on idle
	say "Cards Downloaded"
	delay 1
	do shell script "killall " & appName
end idle

Hey Mark,

Thanks for your reply. This has been driving me nuts.
You solution didn’t quite work out.
Typically, I’ll have 4 compact flash cards downloading simultaneously, using Image Capture.
I have Image Capture set to download all files, upon insertion of a CF card, to the same folder.
Once all cards are downloaded, I’d like to perform some action or script. However, I am not
able to identify when all cards have been downloaded.

Your current solution dose say “Cards Downloaded”, but it dose so after each card downloads, then
it generates the message “No matching processes belonging to you were found.”

Any more ideas?


Actually maybe, when your auto downloads have completed, does you image capture quit by its self.

I noticed this behaviour in mine.

This is something I could work on if thats the case…

There’s always ‘wait for folder size to stabilize’ :

to Changed(myFolder)
	-- initialize the loop
	set Size_1 to size of (info for myFolder) -- get initial size
	delay 3 --wait 3 seconds, or whatever
	set Size_2 to size of (info for myFolder) -- get a newer size, perhaps bigger
	-- repeat until sizes match
	repeat while Size_2 ≠ Size_1 -- if they don't equal, loop until they do
		set Size_1 to Size_2 -- new base size
		delay 3 --wait three seconds, or whatever
		set Size_2 to size of (info for myFolder) -- get a newer size
	end repeat -- once the sizes match, the download is done
end Changed


When I download 1 card at a time, it dose close by it self.
When I download multiple cards, it stays open.


This sounds really exciting, I’ll try it soon and let you know.

Thanks to you booth


Grrr… Thanks Adam :rolleyes:

Just spent all this time testing this with my two cameras.
Only to find you posted

I found that mine like your would close on one download but stay open with more than one

anyway this works. Put it on one of the image capture windows.

property appName : ""
property start_Size : " "
property end_Size : ""
on idle
	set image_folder to alias "Macintosh HD:Users:UserName:Desktop:Images:"
	repeat until end_Size is equal to start_Size
		tell application "Finder" to update image_folder
		set start_Size to (size of (info for image_folder))
		do shell script "sleep 20"
		tell application "Finder" to update image_folder
		set end_Size to (size of (info for image_folder))
	end repeat
	set start_Size to " "
	set end_Size to ""
	say "Cards Downloaded"
	delay 1
	do shell script "killall " & appName
end idle

Great minds think alike…

Thanks Mark


Glad to help.

By the way the Grrrr is at me for being so slow, not Adam.

Understood as such, Mark. :slight_smile: