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.

Possible Duplicate:
Is there a way to limit the size of the Trash?

I'd like to have a way to auto-deleted item in the basket, based upon the time they come in (oldest to be deleted first)...

share|improve this question

marked as duplicate by Lri, patrix, bmike Aug 14 '12 at 19:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

You may be able to do this with a Folder Action. apple.blogoverflow.com/2012/06/folder-actions-tutorial-automation-meet-the-filesystem/

when new item is added, count items in folder, if number of items is greater than threshhold, delete oldest one.

This requires some knowledge of how the trash works...Something about the .Trashes hidden folders.

share|improve this answer
    
Does anyone know a way to get the times files were moved to the trash? Something like this isn't really feasible if it's based on modification dates. –  Lri Aug 1 '12 at 15:06
    
You could change the modified time when items are moved to trash with a simple call to 'touch' in a bash script. –  JMFR Aug 1 '12 at 15:50

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