Restrict Access to any Folder or File Without using any software or password

You may have seen may software to lock the folder/files and you may also have seen batch programs to do the same. Today I am going to share with you a Basic Dos Command which will help you to Restrict Access to Folder/File. The only thing you need for this is the Administrator Access on Windows Machine.

Follow the Below Given Steps to restrict access:

  • Open Command Prompt in Windows
  • Type the Following Command :

cacls “<path of file/folder>” /E /P everyone:n
For example: calcs “C:\users\Administrator\Desktop\Lock.txt” /E /P everyone :n

  • Remember that path of file/folder should be in double quotes (“”). You will get the following message on Success

“Processed File: C:\users\Administrator\Desktop\Lock.txt”

  • Now when you try to open the File/Folder You will get the message “Access is denied”.

Now to Unlock Folder/File and to give it the full access, follow below given steps:

  • Open Command Prompt in Windows
  • Type the Following Command :

cacls “<path of file/folder>” /E /P everyone:f
For example: calcs “C:\users\Administrator\Desktop\Lock.txt” /E /P everyone :f

  • Remember that path of file/folder should be in double quotes (“”). You will get the following message on Success

“Processed File: C:\users\Administrator\Desktop\Lock.txt”

  • You have successfully unlocked the file/folder

Hope You will like it. Enjoy!

Comments are closed.