Saturday, January 22, 2011

HOW TO LOCK A FOLDER . . . .!!!!!!

You can apply permission to a folder so that no one can access it using the CACLS command.Suppose your PC has a folder named "info" on your desktop and you want to lock it then :-

  • Open the command prompt
  • Then you have to specify the path where the folder is placed on your computer.If it is on the desktop then type cd desktop, If it is d drive then type cd d:
  • After giving the path enter the command to lock it,which is cacls "name of the folder" /e /p everyone:n 
  • So to lock the folder named "info" the command is like this cacls info /e /p everyone:n
  • Then exit the command prompt.
cacls-Change access control list
e-edit
p-permission
n-none
f-full control

Now if you try to open that folder,you will get an error message saying ACCESS DENIED.Not just that you cannot even rename,copy,cut,move or do anything with that folder.Go to it's properties and will show you 0 bytes.








Now to unlock the folder the procedure is same.First give the path of the folder and enter the same command, just type f in place of n and then you will have full control over the folder.

  • cd desktop
  • cacls info /e /p everyone:f

* This trick works only for PC's having NTFS file format system.To see your drive format:-
  • Go to start==> Run ==> Type diskmgmt.msc


No comments:

Post a Comment