How to lock and unlock folder using Command Prompt (CMD) in Windows

You can lock and unlock the folder by using the Command Prompt (CMD).

Open Command Prompt (CMD) with administrator rights. Type below command for lock folder.

C:\Windows\system32>cacls <FolderPath> /E /P everyone:n


You can check whether the folder is accessible or not by simply clicking on the locked folder. If deny message pop up comes, indicates folder is locked.

You can unlock folder by type below command in CMD.

C:\Windows\system32>cacls <FolderPath> /E /P everyone:f


Now, you can access the folder by simply clicking it.

Subscribe us to receive more such articles updates in your email.

If you have any questions, feel free to ask in the comments section below. Nothing gives me greater joy than helping my readers!

Disclaimer: This tutorial is for educational purpose only. Individual is solely responsible for any illegal act.

5 thoughts on “How to lock and unlock folder using Command Prompt (CMD) in Windows”

  1. I personally like the straight forward way of writing.

    The usual way just seems watered down to me. Like just get to the point.


Your email address will not be published. Required fields are marked *