Journals

Locking & Un-locking files and folders with CMD

Locking files have been a problem for merely all of us. Here is the solution for that.

Follow the below mentioned steps to lock the files ::

  • open Command Prompt and/or CMD and point to the folder or the file
  • “cacls test.xml /d users” and press enter
  • it will ask you for conformation “Are you sure (Y/N)?” press “Y”
  • if successfully done then it will be give a notification “processed file: D:\test.xml“

To conform whether the file or folder is locked or not type

cacls test.xml – and press enter

the result will be “D:\test.xml BUILTIN\Users:N”

 

With this we will go to the next step for unlocking the file or the folder.

Follow the below mentioned steps to unlock the files ::

  • open Command Prompt and/or CMD and point to the folder or the file
  • “cacls test.xml /g users:f” and press enter
  • it will ask you for conformation “Are you sure (Y/N)?” press “Y”
  • if successfully done then it will be give a notification “processed file: D:\test.xml“

To conform whether the file or folder is unlocked or not type

cacls test.xml – and press enter

the result will be “D:\test.xml BUILTIN\Users:F”

Be The First One To Comment

Add A Comment