Jump to content
MVMike

Adding a Trash alias to the Finder sidebar

Recommended Posts

In past versions of OS X it was easy to add a Trash alias to the desktop or Finder sidebar.

Just search for the invisible file named .Trash and create an alias.

In Leopard this search returns nothing. I've dug through all the hidden files and found nothing that mentions Trash.

Anyone know a new method for creating a Trash alias or what the new file name is for the Trash? - Thanks, Mike

Share this post


Link to post
Share on other sites

There is a terminal command for showing hidden files. I've wrapped it in an applescript that I activate using quicksilver that toggles hidden files on and off. Bear in mind this does restart the finder, so if you're copying any files, emptying the trash etc, things may go wrong. Other than that, it's safe to use.

set Leopard to (system attribute "sysv") mod 4096 div 16 = 5

quit application "Finder"
try
if Leopard then
	set b to (not ((do shell script "/usr/bin/defaults read com.apple.finder AppleShowAllFiles") as integer as boolean)) as integer
else
	set b to (((do shell script "/usr/bin/defaults read com.apple.finder AppleShowAllFiles") is "ON") as integer) + 1
end if
on error
set b to 1
end try
if Leopard then
do shell script "/usr/bin/defaults write com.apple.finder AppleShowAllFiles -bool " & item (b + 1) of {"No", "Yes"}
else
do shell script "/usr/bin/defaults write com.apple.finder AppleShowAllFiles O" & item b of {"N", "FF"}
end if
delay 1
launch application "Finder"

 

It works on Leopard and Tiger, it's not been tested on earlier versions of OS X.

Edited by Graham

Share this post


Link to post
Share on other sites

Thanks Graham,

my issue is not turning on invisible files. I use Tinker Tool to do that by clicking a button. The trouble is there is no longer a

" .Trash " file among the invisible files in your home directory as there was in Tiger, Panther, etc. Where has the Trash file gone?

Thanks - Mike

Share this post


Link to post
Share on other sites

The trash file is only there if you have something in the trash that used to be in that folder. It's removed when the trash is empty. It's now folder specific.

Share this post


Link to post
Share on other sites
The trash file is only there if you have something in the trash that used to be in that folder. It's removed when the trash is empty. It's now folder specific.

No, there is no .Trash file - even if there is something in there. Great script by the way.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing

    No registered users viewing this page.

  • Who's Online (See full list)

    There are no registered users currently online

×