When opening multiple .jpg files (or other format) I can use the "Move to Trash" on all but the last one standing?

Here is a example of two images, and if I select one then the Move to Trash works.


However if I select all or have only one image showing the Move to Trash is disabled?


My challenge is that I open a group of screen shots and then review and delete.

Let say I have 50 screen shots and I open 10 of them to work with. The names are

  • Screen Shot 2015-01-19 at 9.14.42 PM
  • Screen Shot 2015-01-19 at 9.14.17 PM

and so on.

Obviously I can not remember the specific name once I close the Preview and now have to find and delete a specific one, since now it is a part of larger group with very "similar" names.

Is there a way to use the Move to Trash on all images including the last one standing.


5 Answers 5


You can move those files directly to the Trash.

  1. Select them in Preview

  2. Drag them above the Trash in the Dock

  3. Wait for ~2 seconds

  4. Finder window will appear and you can drop those files.

However you won't be able to empty the Trash without closing the Preview window first (the file is still in use).


Preview won't allow you to cmd-delete, or "move to trash", or even drag and drop to trash, the last file it has open. This "feature" was introduced in Lion, and you're not the first person to lament it's inclusion online.

The only useful solution I've found is to create an Apple Script Application that deletes any item dragged on to it and put this application in your dock. Here's how:

  1. Open Script Editor (inside the Applications->Utilities folder) and create a new document
  2. Paste in the following code:

    on open thisfile
        tell application "Finder"
            delete file thisfile
        end tell
    end open
  3. Choose File-> Export to export your newly created application, give it a name that's useful like delete.app and save it into your applications folder. Make sure to change file format to "Application"

  4. Drag the application into your dock

Voila! Any file you drag onto this application will now be moved to trash. The last item open will still in fact stay open in preview once you delete it but it will have moved to the trash from it's previous location. It's not an ideal solution, but it's a solution.

  • No problems, even I didn't realise you could drag to the trash and wait a few seconds...
    – JamiePatt
    Jan 28, 2015 at 2:55

If your Preview.app has been made scriptable. (If I remember right Apple may have made it so in later versions, but with no real dictionary)

You can run this Script, Saved in an Run Applescript Action in an Automator Service for Preview.app, no input.

set theDocs to path of (documents of application "Preview")
repeat with i from 1 to number of items in theDocs
    tell application "Finder" to set item i of theDocs to ((item i of theDocs) as POSIX file) as alias

end repeat
tell application "Finder" to delete items of theDocs

I am still looking at improving this as it works well. But it will get ALL open documents. Which each image grouped or not is seen as.

So beware that if you have Preview.app to open in groups or separate windows and more than one window open ALL will be seen and deleted.

Preview.app does not respect the normal understanding of a window. Hence me still working on this


This (in most cases) should work better. It tries to deal only with the front window and its images.

tell application "Preview"
    set theDocsID to id of window 1
    set theDocsWin to name of (first window whose id is theDocsID)
        set documentCount to word -5 of theDocsWin as number -- the window name has a document count. we can use this repeat for each image.

    on error
        set documentCount to 1
    end try

    repeat documentCount times
        set theDocsPath to path of document of (first window whose id is theDocsID) --the name changes when an image is closed, but the main windows id stays the same.
        log theDocsPath
        tell application "Finder" to set theDoc to (theDocsPath as POSIX file) as alias
        tell application "Finder" to delete theDoc
        close (first window whose id is theDocsID)
    end repeat

end tell

Place this like before in an Automator service.

enter image description here

enter image description here


Some background on why this approach: Each image grouped or single image in a Preview.app's window are seen by preview as a window in and of them selves. And the Actual image as a document.

For example you have two images in grouped in one Preview window.

enter image description here

But what Preview.app sees is: Two windows with a document each.

And the frontmost window will always be a the select documents window.

What we see as the main window knows nothing about the windows inside of it.

This means you cannot use documents of window 1 etc. in the normal way. Because if you have a grouped window you will only ever get the selected image in the group.



The other solution to this problem (personally I prefer the script app in the other answer I gave, but in case that doesn't suit for whatever reason) is to download Xee - an alternative to the preview.app that still allows you to move all items to the trash.


I know this is an old question, but I have found another solution that might be of interest.

  1. Create a "Trash folder" on your desktop that is symbolically linked to the actual Trash directory. (Follow the directions at http://osxdaily.com/2010/07/29/add-a-trash-icon-to-the-desktop/ to see how it's done.)
  2. Inside Preview.app, click on the filename in the title bar and click on the directory name popup in the "Where:" field. Scroll down to "Other..." and navigate to your Trash folder.

Some things that you might expect to streamline this, but strangely don't seem to work:

  • After doing this a few times, you will notice that the Trash folder does not show up in the list of "Recent Places" at the bottom of the directory popup.
  • You might also think you can streamline this by adding the Trash folder to the "Favorites" area of your Finder sidebar, and indeed you can -- but it still doesn't show up in the directory list when you are inside of Preview.app.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .