Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

One of the nice features of the recycle bin in Windows is the ability to sort it by the date an item was deleted. This way if you accidentally delete something, you can easily find it because it will be at the top of the list.

Is there any way to do something similar in Mac OS X's Trash folder?

I see that there is a date modified field, but that is not updated when the file is deleted.

share|improve this question
add comment

4 Answers

Update for OSX 10.9 Mavericks:

It appears that you can now sort by Date Added in OSX Mavericks. In Trash right click one of the columns and click to check the Date Added column. The click on the column header until the list of files is sorted by Date Added descending.


For OS X 10.7 Lion:

Go to the AppleScript Editor, paste in the following script and save it in /Library/Scripts/Folder Action Scripts:

on adding folder items to this_folder after receiving added_items
    repeat with this_item in added_items
        do shell script "find " & quoted form of POSIX path of this_item & " -exec touch {} \\;"
    end repeat
end adding folder items to

Then…

  1. Right-click on any folder in Finder, go to Services and click Folder Actions Setup.

  2. Cancel the dialog asking which script to attach.

  3. Click the checkbox to Enable Folder Actions

  4. Click the plus sign to choose the Trash.

    Press ⌘ cmd + ⇧ shift + G and type in ~/.Trash, click Go or press ↩ return, and then click Open.

  5. On the right side, click the plus sign to choose the AppleScript that you saved earlier.

Thanks to Graham for the link which pointed me in the right direction.

share|improve this answer
    
Does the Date Added field actually show anything for anybody? Mine shows -- for every file in the Trash. Sorting by Date Added does nothing either. –  Phong Mar 24 at 15:33
    
Phong, I'm looking at it right now and mine shows a date in the Date Added column (on Mavericks). As to why it might be blank on Mavericks, I'm not sure. –  Nate Mar 24 at 19:16
    
I've also seen someone else mention the Date Added column somewhere else. They said their column showed -- for all files in the Trash, but clicking the column header actually sorts the files somehow... –  Phong Mar 24 at 19:25
    
Weirdly enough, Date Added started getting populated in my Trash…? –  Phong Apr 2 at 16:48
add comment

This hint from Mac OS X Hints describes how to create a simple Automator Folder Action that performs touch on every file that's trashed.

share|improve this answer
1  
Answers on Ask Different need to be more than just a link. It's okay to include a link, but please summarize or excerpt it in the answer. The idea is to make the answer stand alone. –  patrix Jul 20 '13 at 13:53
add comment

Why do you use the Trash as a "backup folder" ??

I'll suggest that you use the build in Time Machine, and then only use the Trash for the stuff you really want to delete.

That is what the build in backup solution (Time Mashine) are there for - finding old files that has been deleted or modified.

share|improve this answer
add comment

I don't think there is anything exactly like that in Mac OS X.

However, if you accidentally deleted something in the Finder, you can use the "Undo" command to move the file back.

share|improve this answer
1  
IF that's the very last file you deleted. –  Petruza Dec 27 '11 at 16:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.