You can create a folder that is hidden from the default Finder GUI view by taking advantage of Mac OS X’s unix underpinnings. That probably sounds a lot more complex than it is however, and it turns out it’s actually really easy to make a completely hidden folder on the Mac.
This walkthrough details how to both make the hidden folder, and then how to access it yourself in Mac OS.
First let’s create the hidden folder, then we’ll access the secret folder on the Mac, and also show how to make it visible again if you change your mind. All of this relies on placing a period in front of the file name.
How to create the secret folder
* Launch the Terminal (located in /Applications/Utilities)
* At the command line, type:
Feel free to replace the name hiddenfolder with anything else, leaving spaces and special characters out of the name will make it easier to deal with in the future.
How to access the secret folder
* Now click back to the Finder, and hit Command+Shift+G to bring up the ‘Go to Folder’ dialog box
* Type in the full path to the folder you just created, replacing ‘username’ and ‘hiddenfolder’ with your username and folder name, respectively:
* Your hidden folder will now be opened in the Finder, you can drag and drop whatever you want into the directory
Making existing folders hidden and making hidden folders visible again
You can actually make any folder invisible from the Finder (and most apps) just by adding a period to the front of the name, you can do this with existing folders via the command line:
mv Folder .Folder
And you can make any invisible or hidden folder visible again by reversing this and removing the period from the front:
mv .Folder Folder
Note that you can’t enter a period in front of a folder or file name in the Mac OS X Finder, if you try you will be presented with this dialogue box telling you the dot “.” is reserved for the Mac OS X system software:
Setting Mac OS X to display hidden folders
You can actually set Mac OS X to show hidden files by issuing a command in the Terminal. This will expose your hidden folder completely within the Finder, but you’ll also see tons of other important system files and folders. This is generally not recommended to keep activated as it is both confusing to many users and it makes it easy to accidentally delete important files.
Notes on hidden folders
Remember that these folders are not hidden completely, they are just not visible from the Mac OS X Finder. Many applications won’t see the folder either, but various FTP programs like Transmit have the option to show invisible files and the folder would be visible to those applications. Likewise, the folder would always be visible via the command line to anyone who typed the ls command and added the -a flag, signifying to display all files, like so:
If you have Apple’s Developer Tools installed you can use a utility called ‘setfile’ which allows you to set any directory or file as invisible, you can read more about hiding files and folders with setfile in Mac OS X, but the limitations on visibility are practically identical to the above technique: file is invisible from the Finder but visible with ls -a or certain applications.