Skip navigation
This discussion is archived

Show/Hide Hidden Files

8933 Views 10 Replies Latest reply: Dec 9, 2008 3:23 AM by bpbpbp RSS
Dennis_S Level 1 Level 1 (5 points)
Currently Being Moderated
Oct 6, 2008 7:58 PM
When I am on my home network and logged into my other machines (one oc and one other mac) I get to see all the hidden files and it becomes quite confusing. I know its a simple toggle in Windows to show or hide hidden files. Is there a way to do this easily in Mac
Mac 24, Mac OS X (10.5.1)
  • Kappy Level 10 Level 10 (221,015 points)
    Currently Being Moderated
    Oct 6, 2008 8:26 PM (in response to Dennis_S)
    Sure.

    Open the Terminal application in your Utilities folder and enter or paste the following command lines, then press RETURN after each.

    defaults write com.apple.finder AppleShowAllFiles FALSE
    killall Finder


    To show hidden files simply substitute TRUE for FALSE in the first command line.
    Mac Pro 2.66 Ghz; MacBook Pro C2D 2.33 Ghz; MacBook Pro 2.16 Ghz, Mac OS X (10.5.4), Intel iMac C2D 17 "; MacBook 2.0 Ghz; 30 GB iPod Video (Black); iPod Nano 2 GB
  • KJK555 Level 4 Level 4 (2,895 points)
    Currently Being Moderated
    Oct 6, 2008 10:16 PM (in response to Dennis_S)
    This is really handy when you create it as a shell script, wrap it an Automator plugin for Finder and can then access it from the context menu.

    Now I can right click, access the Automator submenu and select “Show Hidden Files” (the name I gave to the plugin). To invert, I select my “Hide Hidden Files” plugin.

    Kj
    Mac Pro, Mac OS X (10.5.5), , Win XP  "Did You Back It Up?" 
  • Kappy Level 10 Level 10 (221,015 points)
    Currently Being Moderated
    Oct 9, 2008 12:23 PM (in response to Dennis_S)
    Automator has a Do Shell Script function. You can use that. Of course you will need to provide some additional code to be able to toggle back and forth between TRUE and FALSE.

    Alternatively, put it in an AppleScript along with the additional script code to do a toggle.

    Or you can download the freeware utility - ShowHideInvisibleFiles - from VersionTracker or MacUpdate.
    Mac Pro 2.66 Ghz; MacBook Pro C2D 2.33 Ghz; MacBook Pro 2.16 Ghz, Mac OS X (10.5.4), Intel iMac C2D 17 "; MacBook 2.0 Ghz; 30 GB iPod Video (Black); iPod Nano 2 GB
  • Kappy Level 10 Level 10 (221,015 points)
    Currently Being Moderated
    Oct 9, 2008 2:20 PM (in response to Dennis_S)
    Sure. Open Automator and start playing with it. Use Automator Help from the Help menu for things you don't know how to do. Go to Apples website and watch the tutorials. Google "automator" and "applescript" for more information. Go to the bookstore and buy some books that provide information on how to use Automator and AppleScript. Visit the library (Public, that is.)
    Mac Pro 2.66 Ghz; MacBook Pro C2D 2.33 Ghz; MacBook Pro 2.16 Ghz, Mac OS X (10.5.4), Intel iMac C2D 17 "; MacBook 2.0 Ghz; 30 GB iPod Video (Black); iPod Nano 2 GB
  • KJK555 Level 4 Level 4 (2,895 points)
    Currently Being Moderated
    Oct 9, 2008 2:44 PM (in response to Dennis_S)
    Hello:
    It's very easy.
    1. Open Automator.app
    2. It will open with a drop down menu.
    In the drop down menu select >custom > choose
    3. In the variables list choose "Run Shell Script", double click it,
    a command box will open.
    4. type in (the first line) defaults write com.apple.finder AppleShowAllFiles FALSE
    5. press return
    6. type in (the 2nd line) killall Finder
    should see this in the box:

    defaults write com.apple.finder AppleShowAllFiles FALSE
    killall Finder

    7. At the top left of your screen select > file > save as plugin
    8. A box will open > Save Plug-in as:
    9. Give it a name like "Show Hidden Files" (without the quotes).
    10. Make sure "Plug-in for: finder" (second line) is selected also. Click Save.

    You are almost done.
    Repeat the process substituting:

    defaults write com.apple.finder AppleShowAllFiles TRUE
    killall Finder

    In step 6 and

    "Hide Hidden Files"

    in step 9.

    Now both commands are placed on the finder context menu.
    You can Access them using Control + Click or setting up a secondary mouse button.

    Kj
    Mac Pro, Mac OS X (10.5.5), , Win XP  "Did You Back It Up?" 
  • GFIVE Level 1 Level 1 (0 points)
    Currently Being Moderated
    Oct 31, 2008 12:09 PM (in response to KJK555)
    Thank you so much 'KJ' for the step by step procedure. Just one thing I'd like to clear up...
    It looks like the TRUE and FALSE mentions are reversed in your tutorial. The first script should be saved "Hide Hidden Files", and the second "Show Hidden Files".

    Hide for fALSE & Show for TRUE.

    Thanks!
    LJ
    G5, Mac OS X (10.5.5), iPhone G3
  • Portlandian Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 8, 2008 6:16 PM (in response to KJK555)
    The other fella is correct about the true false mix up, I thought about that when I was entering the code, but decided to give it a shot anyway having no apple code experience myself(easy enough to fix.)
    Perfect walk through though! This was EXACTLY what I was looking for. Thank you!
    New MacBook, Mac OS X (10.5.5), "returned from the dark side" mac user
  • bpbpbp Level 2 Level 2 (205 points)
    Currently Being Moderated
    Dec 9, 2008 3:23 AM (in response to KJK555)
    Hi, Thanks for the geat information but when I opened Automator the following was showing in the Run Shell Script dialogue box....In the text box it has the word 'CAT' - I assume that this should be deleted before adding the text you recommend. Also, the Shell drop down box shows /bin/bash and the Pass Input drop down box shows 'stdin' - should either of these boxes be changed before saving the script?
    G5 Dual processor & MacbookPro, Mac OS X (10.5.5)

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.