Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Small App Idea: Trash Can with Compressor

Small App Idea: Trash Can with Compressor
Thread Tools
Mac Elite
Join Date: Jan 2001
Location: Helsinki, Finland
Status: Offline
Reply With Quote
Oct 8, 2002, 06:13 AM
 
Hey again.

Didn't find an app like this, atleast through a quickie search, so here it goes, should someone be interested:


Trash Can with Compressor

Background:

The Trash Can is a Good Thing. I've learnt to use it and every now and then find myself hopping in for a quick dig.

Problem:

The stuff in the trash takes up a lot of space!

Solution:

A piece of software which compresses the stuff in the Trash and deletes the originals. This should happen during idle time, or as a scheduled thing.

Encryption of the compressed files and shredding of the originals could be added to make malicious hard drive archeology more challenging.

Result:

Trash Can functionality remains, while disk space gets freed up.


Alternate hack: Compressor

A folder script that does the same for a user designated folder (dubbed 'Compressor' ) that the user then manually empties to the actual trash.

The folder could be kept next to trash in the Dock, even.


Find these useful?

J
(Last edited by Judge_Fire; Oct 8, 2002 at 06:27 AM. )
     
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Oct 8, 2002, 09:46 AM
 
I don't think I'll pick this one up, but I can suggest a name... Trash Compactor!
[vash:~] banana% killall killall
Terminated
     
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status: Offline
Reply With Quote
Oct 8, 2002, 12:22 PM
 
Hmm... can you still attach action scripts to folders, like in MacOS 9?

Could you attach an AppleScript to compress whatever gets thrown in there?
     
Mac Elite
Join Date: Jul 2000
Location: Washington, DC
Status: Offline
Reply With Quote
Oct 8, 2002, 08:25 PM
 
Why wouldn't you just empty the trash? (If something is in the trash, you obviously no longer want it, so what is the point of wasting CPU cycles compressing it?)


How did it come to this? Goodbye PowerPC. | sensory output
     
Mac Elite
Join Date: Jan 2001
Location: Helsinki, Finland
Status: Offline
Reply With Quote
Oct 9, 2002, 03:51 AM
 
Originally posted by krove:
Why wouldn't you just empty the trash? (If something is in the trash, you obviously no longer want it, so what is the point of wasting CPU cycles compressing it?)

The Trash Can has mercy, unlike a straightforward 'Delete'. In ideal circumstances (enough disk space) you wouldn't need to empty the trash at all, giving you a sort of timeline (date metadata) based 'Undo' for file deletion.

This app suggestion tries to honor that ideal, instead of a destructive 'Empty Trash'.

More of a UI principle based idea, really.

J
     
Senior User
Join Date: Nov 2000
Status: Offline
Reply With Quote
Oct 12, 2002, 07:44 PM
 
Tested and typed up in just a few minutes time. It's not automated but to do that shouldn't take much work. Create a shell script and use cron to run it every day....or something.

Step 1: Create a "Trashes" folder in your home directory.

Step 2: Open Terminal
a*: type; "ls .Trash"

Step 3: type; "cd Trashes"

Step 4: type; "gnutar -czvf trash**.tgz ../.Trash"
a: if gnutar returned no error, empty the trash.
From Terminal you could; "rm -rd ../.Trash" - it won't update the Trash icon in the dock but as soon as you click (or add to? not tested) it it creates another ~/.Trash folder.

* if you want to see a list of what's in the trash.
** You may want to add an identifier - like the date or something.

As for creating an AppleScript and attaching it, I don't know if that's possible - it may be. Anyone care to take a stab?
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:53 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2