Restrict Access to folder/file using cmd
Follow the Below Given Steps to restrict access:
1.) Open Command Prompt in Windows
2.) Type the Following Command :1.) Open Command Prompt in Windows
cacls "<path of file/folder>" /E /P everyone:n
For example: calcs "C:\users\Administrator\Desktop\Lock.txt" /E /P everyone :n
3.) 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"
4.) 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:
1.) Open Command Prompt in Windows
2.) 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
3.) 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"
4.) You have successfully unlocked the file/folder
Post a Comment