Home » Questions » Computers [ Ask a new question ]

How to hide a folder in Mac OS X?

How to hide a folder in Mac OS X?

How do I hide a folder in Mac OS X? Also is it possible to password-protect a folder

Asked by: Guest | Views: 108
Total answers/comments: 2
Guest [Entry]

"You don't need to add a period to the beginning of a name, you can use the invisibility bit which is part of the Apple HFS+ file system via the leopard command in a terminal:

chflags hidden ~/MyFiles

This hides your MyFiles folder. You can read up on that command in detail here:

chflags MAN page

Daring Fireball: invisibility bit

You can also toggle showing hidden and unhidden files in finder using this applescript (I compile it to an application triggered via quicksilver):

set onOff to do shell script ""defaults read com.apple.finder AppleShowAllFiles""
if onOff = ""NO"" or onOff = ""OFF"" then
set newState to ""show""
set OnOffCommand to ""defaults write com.apple.finder AppleShowAllFiles ON""
else
set newState to ""hide""
set OnOffCommand to ""defaults write com.apple.finder AppleShowAllFiles OFF""
end if

display dialog ""Are you sure you want to "" & newState & "" hidden files? (This will restart the Finder)"" buttons {""Cancel"", ""OK""} default button 2
copy result as list to {buttonPressed}
if buttonPressed is ""OK"" then
try
tell application ""Finder"" to quit
do shell script OnOffCommand
delay 1
tell application ""Finder"" to launch
end try
end if

Password protecting folders? The way I'd do it is make an encrypted DMG using disk utility and mount it when needed. You could get fancy probably and change the DMG icon to a folder icon, and hide it using the invisibility bit for full on effect :-)

If you want to spend some money doing it: Espionage"
Guest [Entry]

"You can create Disk image with Password protection:

1) Open Applications->Utilities->Disk Utility.

2) Select File->New...->Blank Disk Image.

3) Name it, set the size to what you'll need, set the encryption to AES-128, and set the format to sparse disk image.

4) It'll then create the image and ask you for a password. Be sure to uncheck the option to store the password in your keychain.

Courtesy- http://forums.macrumors.com/showthread.php?t=257063

For tutorial with screens follow this: http://www.mactricksandtips.com/2008/04/password-protecting-folder-solution.html"