How To Lock Folder With Command Prompt?



Lock Folder
Want to lock a folder without using any software / password in Windows, follow these simple steps:
  • Go to start> run> cmd
  • In command prompt, Type cacls "path_of_folder" /E /P everyone:n
  • To regain access type: cacls "path_of_folder" /E /P everyone:f
Note: Do not lock C:\ drive using this trick otherwise Windows will not boot next time. I have already explained one more method of folder locking using Batch. You can check it from here.

Sharing is Caring

Related Posts

Previous
Next Post »

26 comments

comments
Anonymous
January 3, 2012 at 11:03 PM delete

dude i cannot gain access to my folder now please help..

Reply
avatar
January 3, 2012 at 11:10 PM delete

To regain access type: cacls "path_of_folder" /E /P everyone:f

Reply
avatar
Anonymous
January 4, 2012 at 9:25 PM delete

it shows
The filename, directory name, or volume label syntax is incorrect.
wat shud i do now

Reply
avatar
January 4, 2012 at 11:20 PM delete

it means you have entered the wrong path of the file/folder

your path must be like it: c:\hacked

Reply
avatar
Anonymous
January 10, 2012 at 1:06 PM delete

i have entered the correct path but still its showing the same message..
trick doesnt succesfully works .

Reply
avatar
January 10, 2012 at 2:42 PM delete

it should work perfectly buddy!! check your command again or mention here what you're entering!!

Reply
avatar
Anonymous
March 14, 2012 at 8:19 PM delete

... mr. author you mean..
calcs file_dir /E /P everyone:no

to activate..

to deactivate..
calcs file_dir /E /P everyone:f ? meaning false?
no = false = 0

maybe try this one..

calcs file_dir /E /P everyone:1

or

calcs file_dir /E /P everyone:y

Reply
avatar
Anonymous
March 24, 2012 at 12:52 AM delete

f means full permissions.
n means no permissions

Reply
avatar
June 3, 2012 at 11:18 PM delete

Icalcs "pathname" /e/p everyone:n
it is saying not successfully proceed.
can help u the correct command.

Reply
avatar
June 3, 2012 at 11:59 PM delete

@bharadwaj: put space between /e and /p like it: cacls "path_of_folder" /E /P everyone:n

CACLS not ICACIS

Reply
avatar
August 8, 2012 at 10:43 AM delete

Well the post was really helpfull.... Thanks a lot

Reply
avatar
August 8, 2012 at 10:44 AM delete

Well the post was really very helpfull... Thanks

Reply
avatar
Anonymous
October 14, 2012 at 8:40 PM delete

i am also not gaining my folder again
through command
cacls foldername /E /P everyone:f(this also doesnot work)
cacls foldername /e/p everyone:f(this also doesnot work)
cacls foldername /e /p everyone:F(this also doesnot work)
what can i do now????

Reply
avatar
Anonymous
October 16, 2012 at 7:25 AM delete

what to do to regain access to logical drive d:

Reply
avatar
October 16, 2012 at 12:56 PM delete

@Anonymous: its not foldername, its folderpath after cacls!!

Reply
avatar
October 16, 2012 at 6:17 PM delete

I am also not gaining access of my folder.
Initially I was able to gain access.
But from yesterday I lost access of my locked folder.
I tried cacls "E:\VIVEKSING" /E /P everyone:f many times.
But its not working.
Please tell me as soon as possible. There are urgent files in that folder.

Reply
avatar
October 16, 2012 at 11:19 PM delete

@Viveksing Vijay Chavan: those who are facing problem while regaining access to their folders, contact me via contact form, I will solve their issues via teamviewer or logmein!

Thanks for reading!

Reply
avatar
October 17, 2012 at 5:56 PM delete

@Viveksing Vijay Chavan: on the top of the site under menu bar, you will find it!

Reply
avatar
December 9, 2012 at 6:18 PM delete

i wana lock aman foldr in g drive ... then what i should give the command in cmd ... explain plzz....

Reply
avatar
December 9, 2012 at 6:22 PM delete

i wana lock aman games folder in g drive thn plz explain ki kya command du cmd me ..??

Reply
avatar
March 9, 2013 at 9:06 PM delete

i want to lock a folder picography on my desktop wath should i type cmd

Reply
avatar
March 9, 2013 at 9:53 PM delete

@Kartik Umalkar: use "cd desktop" in cmd firstly to go to desktop location, then follow the above steps! Thanks

Reply
avatar
Anonymous
June 9, 2014 at 9:09 AM delete

i try it again and again please help me

Reply
avatar
June 9, 2014 at 11:58 AM delete

@Anonymous: Hi, can you please specify folder path where are you making changes so I can provide exact command?

Thanks

Reply
avatar

Thank you for your comment.