Trashing photos from within an iPhoto album

The current version of iPhoto (6.0.6) does not allow the user any way to directly delete a photo from the library and add it to iPhoto’s trash album while working within an iPhoto album view. You have to switch to Library view to drag and drop, or to use the Cmd-Delete key combination to move a photo to iPhoto’s trash. Once an image is in the trash, the user can still retrieve it before emptying the iPhoto trash.

In any case, for those interested in doing such a thing, this script works to transfer selected images to iPhoto’s trash, and remove them from the current album:

tell application "iPhoto"
	set a to selection
	repeat with b in a
		add b to trash album
		remove b
	end repeat
end tell

Hello Graig

I just wrote a script that removes pictures from a single album. It moves them into the trash and empties the trash. But they stay as a copy in the mainarchive-album. Any idea how to remove them completely? I now have a lot of duplicates in the main-archive.

The script follows yours except the selection clause. I use the pathes of the files iPhoto tells me to delete them. It happens on Mac OS X 10.4.11 with iPhoto 5.0.4. Will have to crosscheck with Mac OS X 10.5.2. Maybe it’s an Apple bug.

If you or anyone else has a solution, this would be pretty helpful. My idea is to delete the files from the hard drive using the Finder, then updating the main-archive by restarting iPhoto. Might this work?

Best regards,
Thomas