Skip navigation

AppleScript  - Delete successfully imported images from disk (after import)

968 Views 15 Replies Latest reply: Apr 22, 2012 1:01 PM by léonie RSS
1 2 Previous Next
BinaryDrummer Calculating status...
Currently Being Moderated
Apr 21, 2012 6:28 PM

I have many image files that I would like to import into Aperture.  I can do this one folder at a time, or many folders at a time.

 

These are going to be imported to Aperture's database (as managed pictures) from my iMac's internal drive (the original folder containing many images).

 

I would like Aperture to delete all the images that are successfully imported.


I would like Aperture to leave the images (and folder) behind that are NOT successfully imported.  Perhaps they are duplicates, or perhaps they are images that are not compatible with Aperture (.wmv, etc).

 

 

Could anyone design an AppleScript that tells Aperture to delete all Succesfully Imported images from their original folder?

 

 

Thanks so much!

Aperture 3, Mac OS X (10.7.3)
  • Frank Caggiano Level 7 Level 7 (22,770 points)

    Not easily done (if possible at all). Once an image is imported into Aperture there is no connection to where it came from so no way to find it to delete it.

     

    But even if it was possible it would not be a good idea. You really don;t want to delete your source until you have confirmed that the image has been successfully imported and no program can determine that. There are always cases of the file being imported but some glitch causing the image not to be render correctly. A program would only know the file was imported not that it wasn't viewable.

  • SierraDragon Level 4 Level 4 (2,665 points)

    BinaryDrummer wrote:

    Could anyone design an AppleScript that tells Aperture to delete all Succesfully Imported images from their original folder?

     

    No. Because like Frank said it is not possible to automatically know images are "Succesfully Imported" [sic].

  • Frank Caggiano Level 7 Level 7 (22,770 points)

    Not possible. Can't find where the image came from, can't know if the import was successful.

     

    As I said in my first post and as Allen said in his.

     

    What's rude is not reading what has been posted in reply to your question.

    TO EVERYONE --

    As is shouting

  • DiploStrat Level 2 Level 2 (345 points)

    BinaryDrummer wrote:

     

    TO EVERYONE --

     

    Just to verify the goal of this thread - it is not discussion.  Please only respond if you do have the ability to script this.

     

     

    (NOT trying to be rude!  I just want to save everyone's time and, if possible, accomplish this.    No discussion is needed on the topic unless it moves toward the desired functionality.)

    Sorry Dude, but you are being extremely rude. This is not your private forum and many threads take many an interesting turn into areas that are very useful to other people, even if you don't want to be bothered.

     

    So despite your  S H O U T I N G !!, here's a freebie: You can come very close to accomplishing what you want by using Referenced Masters with the "move" option engaged, no Applescript required. Enjoy! (And, if you ask, Alan will be happy to give you several reasons why a Referenced Library might be better on your hardware, etc.)

    --

    DiploStrat

     

    Message was edited by: DiploStrat To add "Welcome to the Forum. Many of the members here are professional photographers, computer scientists, and experienced hobbyists who have been using Aperture since it first came out. All are willing to devote insane amounts of time (in a variety of languages) to help you get the best out of your system, if you will but treat them with a minimum of courtesy."

  • Frank Caggiano Level 7 Level 7 (22,770 points)

    by using Referenced Masters with the "move" option engaged,

    But again there is no confirmation that the image was imported successfully only that Aperture took the file and moved it. The state of the image in Aperture is unknown.

     

    There have been many cases where the file appears to be imported OK but when looked at in Aperture it is found to be corrupted in some way. There was just a thread here that went on for 7 pages or so covering this exact situation.

     

    So again I have to say that the OPs request

    I would like Aperture to delete all the images that are successfully imported.

    is not doable at this time.

  • DiploStrat Level 2 Level 2 (345 points)

    Agreed. Hence my caveat of "very close."

     

    I actually like your Reagansonian "Trust, but Verify."

    --

    DiploStrat

  • léonie Level 8 Level 8 (46,460 points)

    Everything is possible, and I look forward to hearing from someone that can accomplish it.

    Frankly, you are asking a lot: Please try to understand that it would be very problematic for us to post a solution that is not safe to use - you have been told so by the most experienced users here, why it is considered unsafe to do what you want to do. You may be quite wllling to take the risk, but we have to remember that any answer posted here will be sitting around for a very long time; people will come across it and read it out of context, and they may very well just try the script, thinking it to be perfectly safe to delete images after import. I certainly do not want to be responsible for that, even if  I know that you would be delighted to risk this. This is not the place to give unsafe recommendations, sorry. We are bound by strict rules here.

     

    So try to learn Apple Script - Aperture is highly scriptable and you may enjoy writing your own scripts.

     

    Regards

    Léonie

  • Frank Caggiano Level 7 Level 7 (22,770 points)

    Ah right 'Very Close', good for horseshoes and hand grenades!, everyplace else it's just a miss

  • DiploStrat Level 2 Level 2 (345 points)

    Depends on the goal:

     

    -- If your goal is to know that Aperture took the file, then the "move" option works perfectly, as it empties your source folder. In fact, this is exactly the process I use importing scanned slides and negatives. They start out in a folder and then are moved into the Aperture Masters Folder. When the folder is empty, I know that they have all been imported.

     

    -- If your goal is to assure that Aperture did not somehow mess up the file, then you are correct, I know of no other way to assure a "successful" import other than the Mark One Eyeball.

     

    Just depends on what you are trying to do.

     

    On the other hand, I have never had an import fail in any way, dating back to 2006. I did however, encounter one "unknown format" error on a JPEG, sometime in the process of converting to Referenced Masters. A database rebuild cured the problem, but I was surprised as it was an image that had never been touched or adjusted in any way.

    --

    DiploStrat

  • léonie Level 8 Level 8 (46,460 points)

    2) Then I'll visually scan through the new Project in Aperture to make sure nothing was corrupted.

    To be sure you actually are checking the imported master image files while you are browsing the import, and not the previews generated in the camera or attached to the raw files, press the "m" key. This will set the viewer to display the master, while you are browsing.

     

    Corrupted imported files may go unnoticed for a very long time, sometimes many years, if you never try to edit an image, because the preview looks o.k. and the master is never actually read by Aperture.

1 2 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.