You can lock any folder with this simple trick. By just revoke all the permission that folder already has you can lock a folder. By this trick-you are actually take all the permission from the folder to being modified(like rename, copy, move, etc.).
Here's the method...
Step 1: Open run from the start menu or just press "WindowsKey+R" and type "cmd".
Step 2: Then set the location of your folder which you want to lock.
(Here I want to lock a folder named 'ComputerGeek' located in drive D)
Step 3 : Then type this code : cacls FolderName /e /p everyone:n
and then hit enter.
- If the process succeed-then it will show: "processed dir: [YourLocation]"
(Here ComputerGeek folder in D drive-so I will type this code as shown below :
cacls ComputerGeek /e /p everyone:n)
Done!
Now, when you try to open that folder-it will show: "You don't currently have permission to access this folder."
How To Get Back Full Access :
To get back full access to modify the folder, all you have to do replace 'everyone:n' with 'everyone:f' in code.
- So new code that will give all permission to the folder is: cacls FolderName /e /p everyone:f
Meaning of the code :
- cacls - Change Access Control List
- /e - Edit
- /p - permissions
- everyone - All user
- n - None (no permission)
- f - Full permission
Note: Someone can get access to that folder if he/she knows how to take permission from the administrator.
See also :