daremigio daremigio - 1 month ago 7
AppleScript Question

How to make a script to show/hide hidden files in Mac OS X?

I just got my MBP with Retina and i'm really new to the Mac OS X (using PC before). I noticed that the Mac doesn't have a GUI to show/hide hidden files like Windows. I've researched and saw this site Show Hidden Files on your Mac. And yes, it works.

To show hidden files:
(Using Terminal)
defaults write

com.apple.finder AppleShowAllFiles TRUE killall Finder


To hide hidden files:
defaults write com.apple.finder AppleShowAllFiles FALSE killall Finder


What i wanted to do is to make an executable script that will perform the above commands when i double-click it so that i don't have to type commands in Terminal in order for me to show/hide hidden files. I saw Applescript but i'm not very familiar with it. I don't know the commands to perform what i want. But i've read some.

Can someone please help me make an executable script that will show/hide hidden files in my Mac?

Answer

I saw a link which provides options to Show/Hide hidden files.

http://appducate.com/2013/01/how-to-show-hidden-files-folders-on-your-mac/

I used the Automator Script which you can download from the link that i gave.

To make things more efficient for me to Show/Hide hidden files, I saved the script as an Application using Automator.

And then created a keyboard shortcut for the "Show-Hide Hidden Files" application that I created using the steps found here:

http://superuser.com/questions/245711/starting-application-with-custom-keyboard-shortcut

And now i just have to press the keyboard shortcut if i want to show or hide hidden files. I can do this in any application. :)

BTW, thank you all for your answers. This is just another way to show/hide hidden files efficiently.

Comments