There are several ways how to toggle hidden files - via a shell command, or AppleScript, or Automator action, or even a Dashboard widget. All of them close and reopen Finder windows, which is quite annoying.

On the other hand, for the Open File dialog one can easily toggle hidden files by pressing Command+Shift+Period.

Is it possible to avoid relaunching Finder?


It is better to use Path Finder instead, which allows not only to toggle hidden files without a perversion, but many other nice things. Really awesome app.

  • 2
    The "theoretical" part of the question kind of made this argumentative (and hence subject to be closed), unless some Apple engineer happens to be reading this. I like the rest of the question though, so I removed those words. I guess the answer is currently "no", as probably Finder reads this setting when it's started. But that's an argumentative answer, so let's hope for an answer that says "yes, ..." – Arjan May 8 '10 at 16:01
  • 1
    Too bad. Accepting the "no" also ensures the Community user will never poke this question, to bump it onto the front page every now and then... – Arjan May 9 '10 at 15:11
  • Ok, good point. Let's leave some hope – Andrei May 9 '10 at 15:27

There is a solution now.

The latest release of TotalFinder (0.9.1) can toggle show/hide hidden files without Finder restart. Tested it, it works well, and removes this long-lived annoyance of the Finder. TotalFinder is free for now as it is prerelease software, but will be around $10 or $15 when it hits final.


No, you cannot, because there is no way to notify the Finder (or any process for that matter) that its preferences file has been modified behind its back.

  • That assumes the only way to make Finder show hidden files is by hacking its preferences. (Which probably is true indeed.) – Arjan May 9 '10 at 15:09
  • There's no need for assumption when the facts are right there. – Hasaan Chop May 9 '10 at 19:14
  • 1
    Then point us to those facts, please... – Arjan May 9 '10 at 21:06

I found a similar question here: Apple Script - Reopen Closed Finder Windows

The posted script by adayzdone may be what your looking for. It still has to relaunch Finder but when it relaunches, it returns the the same windows in the same directory you were in when they closed.

tell application "Finder"
   set windowTargets to target of Finder windows
end tell

set OnOff to do shell script "defaults read com.apple.finder AppleShowAllFiles"
    if OnOff = "NO" or OnOff = "OFF" then
        set OnOffCommand to "defaults write com.apple.finder AppleShowAllFiles ON"
        set OnOffCommand to "defaults write com.apple.finder AppleShowAllFiles OFF"
    end if
    do shell script OnOffCommand
    delay 1

tell application "Finder" to launch
    tell application "Finder"
    repeat with aTarget in windowTargets
        make new Finder window at aTarget
    end repeat
end tell

copied from referenced question

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.