Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

budsimrin

macrumors newbie
Original poster
Sep 18, 2008
17
0
Fort Worth, TX
Does anyone know a way to delete items placed in the trash, say, 1 week ago or longer? I don't just wish to empty all items in trash; I wish items to stay in the trash for a few days in case I change my mind.

I used to use Compost to do this, but it no longer is supported.

I notice that the Mountain Lion Finder has a category "Date Added". Presumably that is the date a file was added to a folder? Can anyone write a simple script that deletes all items in the Trash folder whose date-added exceed N days, where N is any desired number? I would then schedule the script to run every day.
 
When you empty the trash, it deletes EVERYTHING within. There is no way around this, as far as I know.

So... if you don't want to lose things put into the trash when you empty the trash -- DON'T put those things in there.

Suggestion:
Create a new folder on the desktop. Give it a name something like "almost trash".
Then, put the stuff you want to _eventually_ trash (but not immediately) into this folder, instead of into the trash itself.
Then, periodically move the folder to the trash to get rid of it.
 
Suggestion:
Create a new folder on the desktop. Give it a name something like "almost trash".
Then, put the stuff you want to _eventually_ trash (but not immediately) into this folder, instead of into the trash itself.
Then, periodically move the folder to the trash to get rid of it.

It's funny, but I had the impression that modern tech was aimed at reducing the number of redundant actions required in a task, though it seems you have a better concept to share with us?
 
A step in the right direction...

Thank you, Fishrrman. I appreciate your help. Your idea doesn't do quite what I need. I want to only delete items that have been in the trash for, say, 7 days (or longer). If I empty the temporary trash folder you suggest each week, I will also be deleting items that are only 1 day old, 2 days old, etc.

It seems to me a pretty simple Applescript could be written, using the "Date-Added" folder attribute, that would check each item in the trash, one-by-one, and remove only those added 7 days ago or longer. Then the script could be schedule to run every day.

I just am not sufficiently proficient with Applescript to do this. Perhaps a Keyboard Maestro macro would work? Or Automator?

I know this can be done since the Compost app does this, just not in Mountain Lion. I believe Compost works in all previous versions of Mac OS X.
 
Last edited:
Your idea doesn't do quite what I need. I want to only delete items that have been in the trash for, say, 7 days (or longer). If I empty the temporary trash folder you suggest each week, I will also be deleting items that are only 1 day old, 2 days old, etc.

Right click on the desktop folder & go to Show View options - in the small window that opens - set 'Arrange by' to 'Date Added'.

It will then divide the folder and you can easily see which files are over 7 days old.
 
But... I don't want a manual process. I want it automated

:eek:Thank you, ricede. You are correct, but then I have to remember to do this manually every day.

I am looking for an automated process. I shouldn't have to think about emptying the trash. I want files put in the trash to disappear automatically after they have been there 7 days, and I want the other files to remain in the trash. Surely someone knows hows to write a simple script that does what you suggest?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.