One Click Show/Hide Hidden Files
Written by Jacob Thomason   
Friday, 07 October 2005
It never fails that you sometimes need to access hidden files, whether you are working with .htaccess files, hacking applications, or just messing around with various scripts.  Gaining access to the hidden files can be quit cumbersome and if you need to do it alot it really gets agrivating.  You could leave them visible, but who wants to look at them all the time? So, I made an application out of apple script and integrated it into my finder for one click show/hide access.  For more details, read on.

 


I am going to include the code as well as the completed application incase you would like to edit the script or just implement the application.  Please note that this has been tested with Mac OS X 10.4.  I can not be certain of compatibility with other releases.

Lets first start with the script.  If you would like to edit this script, you probably already know how.  Therefore, I will skip that part and save everyone the agony of having to read it.  So, here is the code that I used for this application.


property workingfilename : "~/Library/Preferences/com.apple.finder.plist"
tell application "System Events"
    get value of property list item "AppleShowAllFiles" of contents of property list file workingfilename
    if result = "true" then
        set value of property list item "AppleShowAllFiles" of contents of property list file workingfilename to "false"
    else        
        set value of property list item "AppleShowAllFiles" of contents of property list file workingfilename to "true"
    end if
    tell application "Finder"
        quit
        delay 1
        tell application "Finder"
            launch
        end tell
    end tell
end tell


 

So, if you arn't really interested in editing the script and just want the application and learn how to implement it I am going to show you how.  It is very simple! 

  1. Download the application icon show-hide_hidden.zip (2.71 KB).
  2. Now, put the file "show-hide_hidden.app" somewhere on your system.  Maybe your Applications folder would be a good choice.
  3. Now, this application will show/hide your hidden files whenever it is launched.  You could place it in your dock or in your finder window as I did.



  4. To place it in your finder window just drag it up there, hold for a second, then you will see it become placeable.  Finally, just drop it there, and you are set.
Now, whenever you are messing around with files and you need to get access to hidden files, just one click that button and it will restart the finder showing all your hidden files.  O, and it does remember which finder windows were open when it restarts.  That is important ;)  - Enjoy.



Comments (1)
22-03-2008 02:28
 
jose romellon
Guest
 
gracias

Write Comment

Name:
Comment:

Code:* Code
I wish to be contacted by email regarding additional comments



 
< Prev   Next >