|
|
Use OS X's trash in a Finder-like way from Terminal
This code looks like it will be very helpful.
Separated scripts, instead of functions
I've been meaning to do that for a while, especially since these functions are basically self-contained. Their only dependencies are on
seq(). I'll update the SourceForge page with that at some point.
Use OS X's trash in a Finder-like way from Terminal
It occurred to me after posting my previous comment that there is a much simpler way of accomplishing the goals of this hint. Moreover, this alternative method avoids the possible problems that others have posted about here, since it works not by emulating the process Finder uses when trashing things, but by actually having the Finder itself do the job.
To send files to the Trash using the command line, save the following code in a file on your Desktop called
To empty the trash, this code will work nicely:
To empty the trash securely, use this:
EDIT: Updated the Edited on Apr 23, '10 11:31:41AM by Sesquipedalian
Just script the Finder via osascript
But, of course, this method fails completely in any situation where Finder won't cooperate, such as: Edited on Apr 24, '10 10:59:23AM by GaelicWizard
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.08 seconds |
|