Creating hidden files

Is it possible to create your own hidden files, for your own personal use? If it is, can you tell me how to do it?

MacBook Pro 15", Mac OS X (10.4.10), 2 GHz/80GB/2GB

Posted on Oct 20, 2007 2:36 PM

Reply
9 replies

Oct 20, 2007 2:43 PM in response to Italian Stallion

Any file with a . at the start of the name is invisible ...

You might do better creating a password protected folder, here's how:

Launch /Applications/Applescript/Script Editor
Paste this in:

on opening folder This_Folder
repeat
tell application "Finder"
set dialogresult to display dialog "Restricted Folder. Please enter the password to access folder:" buttons {"Ok", "Close"} default button 1 default answer "" with hidden answer
copy the result as list to {PWText, button_choice}
set button_choice to the button returned of dialogresult
if button_choice is equal to "Ok" then
set PWText to the text returned of dialogresult
if not PWText = "your password" then
display dialog "Access Denied" buttons {"Ok"} default button 1
else
display dialog "Access Granted" buttons {"Ok"} default button 1
exit repeat
end if
else if button_choice is equal to "Close" then
tell application "Finder"
close folder This_Folder
exit repeat
end tell
end if
end tell
end repeat
end opening folder

Click 'Compile' then 'Save As'
(Where it says "your password" insert the one you want)

Then CTRL-click on a folder / (Enable Folder Actions if not on) / Configure Folder Actions / Activate and select your script.

Oct 21, 2007 12:13 PM in response to Italian Stallion

"...when i clicked compile and save as, it never asked me for a password...."

Well, that's not quite where you are supposed to be asked for a pasword. What iVmichael meant by the statement, 'Where it says "your password" insert the one you want', is that in that line of script where it says:

if not PWText = "your password" then

you substitute your own personal password for the text he has in quotes: "your password". His use of that phrase is just a placeholder for you to add in your own.

So you weren't asked for a password after the compile/save as phase because that's not what the script does. You insert your password INSIDE the script, before compiling and saving.

Hope that helps...

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Creating hidden files

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.