Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How can I create an application to hide my files?

Hi, I was wondering how to create an application that can hide my files.


I am currently aware that I can hide a file using Terminal and inputting "chflags hidden" followed by the file's path, so now I want to create a workflow or application or something like that that can help me complete the task automatically.


My idea is to manually copy the path of the file I want hidden, and then to run an Applescript which opens Terminal, enters "chflags hidden " in the Terminal, followed by command+V, which pastes the path I copied, and hit enter, which hopefully would hide the file, and then quits Terminal.


I'm not really sure how to complete the process above( I'm currently stuck at having it press command+v), and I'm not quite sure it will work either.


Can someone please help me with it? I know it seems a bit rookie. I Googled some information on Applescripts by others, but I keep having my clipboard pasted onto Applescript instead of Terminal. Thanks a lot!

Posted on Aug 27, 2015 5:30 AM

Reply
3 replies

Aug 27, 2015 6:25 AM in response to V5RM

Hidden files can be revealed with a simple command. A better option is to create an empty disk image (.dmg) with Disk Utility and encrypt it with 256 AES. Keep the password written down somewhere safe. You can mount/add/remove files and folders to this disk image with a single password prompt. Optionally, you can hide/unhide it as needed, but even if it were visible, it would be sufficiently protected with the AES encryption. Your own private vault. Depending on how important the content might be, I would keep this backed up on two forms of external media (flash card, hard drive) for redundancy.


ls -lO | grep hidden


drwxr-xr-x@ 13 viking staff hidden 442 Jan 9 2015 test

Aug 27, 2015 7:50 AM in response to VikingOSX

Thanks a lot, but I was actually trying to hide files and folders that I wouldn't be using such as the iTunes folder under music. I thought I could hide them so I can browse through my Finder more easily( since I would not be seeing folders I don't need), but as it turns out this doesn't really work, so I suppose I won't need to hide these files any more.

How can I create an application to hide my files?

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