Secure Private Folders Making Inaccessible and Undeletable
If you are so much worried about privacy of your data in your computer then there are some tricks to make private or hide your data. There are available many software/applications that allows you to hide/lock your data. But personally, I don’t like to use so many software in my computer. Especially for those purpose which may be available in Windows without using any soft pack. Here, in this article I’ll describe a simple process to make private some data or any file, you want.
Read also: Make Bootable Image(ISO) Of Windows XP Service Pack 3. & Password Protect Folder Without Using Any Software in Windows
At first create a folder in some safe location of your hard drive. It is wise to keep the folder in the “Program Files” folder in the root drive. Give it any name. Let the name is “Private” for example. Now keep all the file like text files, images, videos or any other type of files which you want to make private, in that folder “Private“. Now we shall make the folder “Private” inaccessible and undeletable as well so that any body can’t able to access the content of the folder. The procedure is too simple. You can make any folder private just typing a command in the command prompt.
Tip: Scan online your computer to protect from the hackers.
Open command prompt ( Press Win key+R, type “cmd” in the Run dialogue box and hit “Enter”).
In command prompt type the following syntax:
cacls <folder name> /e /c /d %username%
For instance in this article the command should be
cacls Private /e /c /d %username%

That command will make the folder “Private” inaccessible and un-deletable. If any body tries to access the folder or delete that, the following message will be shown:


Now when you want to access the folder for your need then type the following syntax in the command prompt and hit “Enter”:
cacls <folder name> /e /c /g %username%:f

This will return the folder in its normal form.
This trick works in both Windows XP, Windows 7 as well as in Windows vista. But the file system must be NTFS.
Reader Comments
I have successfully made the folder undeletable and inaccessible. Bur, OMG, I can’t make it accessible again. When I try it on the CMD it gives the message “access denied”. Advise.
Regards
hi when i tried the above mentioned command in my pc running on win7 i got the following message” No mapping between the account name and security id was done”.. tried it several times but i was not able to make the folder undeletable and inaccessible.. pls advice
@Chaminda
make sure that the user have the full access. As example an administrator account has the all privilege.
@kris
It is not clear in what command are you facing the problem? The screen shots in this articles are from Win 7. So it is clear that it works well in Windows 7. You should specify the actual area of your problem so that I can help you. Feel free to share you problem.
when i type the following command “cacls private /e /c /d %username%” n press enter i get the following message in dos prompt ” no mapping between the account names and the security IDs was done”… i have created the folder on the desktop n tried this command n my file system is NTFS.. i have named the folder “private”
@kris
it seems to be that your operating system have a problem. Are you the administrator of your system?
yeah i am the admin..
hi it works fine now:-) anyway thanku so much.. this is a wonderful site u got here, got lots of useful info.. keep up the good work buddy:-) looking forward for ur future posts.
@kris
Thank you Kris. I’m happy to see that your problem is solved.
Hi,
The technique works fine but if anybody knows the data name inside this folder then he can directly access the data with run command. means if i have made the private folder unaccessible with this command and there is a folder named “One” inside private folder.
then i can access the internal folder with the run command as C:\……\Private\one.
We’ll be able to access the data and even if anybody searches in the parent folder of Private folder for the data type(like search for “*.dat”) which is contained in the Private folder then the results will contain the data from Private folder if any present of that type.
And we can again easily access the search results of the unaccessible folder. So this technique is not full proof and don’t rely on it blindly.
I tested it in Windows 7.
@Anil,
You are quite right. If any body knows the exact name of your secret file then he can play with that. But this article has written on the virtue that your friend or any body does not know the file name but you want to prevent them to discover your secret file names when accessing data. It should not visible in the search results as the folder is not accessible for a specific user. It depends on user information in that computer. If there are more than one user then make the folder inaccessible for each user. However thank you for your investigation. Keep it on and let me know if you have any other query.
hii i like it and it works on win 7 if you .
i have an extra feature for this if you want to lock any folder in your computer in win7 then go to start then programs accessories then right click on the command prompt and run it as administrator.you can lock any folder in computer.
visit my blog definitelyearn.blogspot.com
I tried it successfuly. but its unsecure.
any trick to secure it (lock it) from other users who have administrator rights too so that information is made unavailable in searches. like search “*.doc” etc. ?
hey..its a good idea…but i cant make it accessible again
please help me……….
@ajay
Yes you can make it accessible by the command described in the article. But it is not possible to permanently make inaccessible the folder here. The folder can be made inaccessible for some user of your computer. Thank you for your comment.
Hi… i m able to make all my folders accessible and inaccessible except 1. i made 1 already created folder name viedos-s inaccessible which contains some other files and folders. now i m unable to make it accessible again. please help… i have all privilages…..
@Suprit,
write the command properly. It should make it able to return in the normal form.
to make things easy just create two batch files using note pad and name then as key and the other one as lock
all you have to do is double click
KEY
cacls /e /c /g %username%:f
LOCK
cacls /e /c /d %username%
You can save it any were even in you flash drive
to make things easy just create two batch files using note pad and name then as key and the other one as lock
all you have to do is double click
KEY
cacls (directory here) (folder name here ) /e /c /g %username%:f
LOCK
cacls (directory here) (folder name here )/e /c /d %username%
You can save it any were even in you flash drive
@Vincent Soko,
Thanks for your tips. We shall update in in this article.
MSDOS indeed has powerful commands such as these to perform advanced tasks. This Access Control List (ACL) command is really of great use edit and display file permissions on NTFS partitions. This is one of the best ways I have ever known to make folders completely private. Thanks for sharing Tanmay….
@Ramaraobobby: Thank you.
Hi,
Can i make one private folder in external USB drive , so no one can access that folder in any system, without my permission
Please advice
@Deepak: This tutorial uses A DOS command Cacls which can be run only on NTFS file system. So if your external drive file system is NTFS then you can. But that is not more secured if you want to make inaccessible your folder by this method as your friend or any third party can know about the command. Then he/she can easily use the reverse command to access that. The best way is to password protect your folder. I wrote about that tutorial. Click here to visit
Hi,
Thanks for the suggestion.
It worked bu i am unable to access again.
Advise
@Utteb: Just run the command cacls /e /c /g %username%:f. You should able to access the folder again.
Thnks buddy it helps a lot I guess it works the same as secuKeeper but the difference is it cant be unlock with the same command which make it totally inaccessible any idea how it works?
try adding this code inside your inaccessible folder:
attrib +s +h *.* /s /d (save as anyname.bat to hide everything)
attrib -s -h *.* /s /d (to undo the effect)
it helps to prevent locating the files on command prompt.
I forgot the bat files you created will not be excluded try adding additional line example the bat file I created name hide.bat
attrib +s +h *.* /s /d
attrib -s -h hide.bat
thanks again..
@Grouver: You are welcome. Thanks for sharing.
Hey I got problem regarding the code I cant access it even typing the correct command I got denied many times I successfully turn the other programs and folders to their original attributes except the 3 software I got
bootskin.exe
ccsetup233.exe
Faronic_DFS (folder and deep freeze files contained inside)
any idea why?
Thanks God I found a solution for this bug ^_^!
for those who got the same error try searching SubInACL.exe
hotfix from Microsoft.
anyway thnxs again tanmay for sharing.. this is a very useful command… I hope you can share more tips with regards on bat files programing.
Hi Grouver. Thanks for your appreciation. Any way you can also see another interesting post with batch file. Here it is http://www.techtipsgeek.com/password-protect-folder-without-using-software-windows/3947/
Thanks tanmay I’ve seen that post before. Good luck and keep-up the good work and If you want can try using editv32 to mask the password with asterisk, you can use that as substitute to set command on bat files and there are lots of options you can use. I also tried this on vista and it works.