Completely Free .NET word API

Resources » Technical Tips » Windows

Folder lock using command prompt

Updated: Category: Windows
Author: Member Level: GoldPoints: 2

To lock a folder in windows XP without any software. Follow the steps below.

1. Make a Folder in any drive.

2. Now open Command Prompt. Set your Drive and Directory where you make your folder.

3. Type "attrib +s +h C:\ajay" without quotes and press enter.
(Here I make a folder in C Drive and name it a).

4. This command will make your folder invisible.

5. To make it visible again type "attrib -s -h C:\ajay".

You can lock any other folder also by changing the location C:\ajay to address of your folder.


Did you like this resource? Share it with your friends and show your love!

Responses to "Folder lock using command prompt"
Author: Prashant Swami  18 Nov 2009   Member Level: Silver   Points : 0
Nice tip.
will try.


Author: Vinod  12 Aug 2010   Member Level: Gold   Points : 1
hi Ajay Kumar Tak

is this locking the folder or hiding?
where is the password?

and i think if you have password to open a folder than and only than it called lock folder.
am i right?

All the best

Author: Sharad Sharma  12 Aug 2010   Member Level: Gold   Points : 1
Thanks for a nice tip

Can we lock the folder in such a way, that would need a password when we double click it.


Author: Anil Mehta  30 Aug 2010   Member Level: Silver   Points : 0
It's a very nice tip.
thanks for this.

anil jain

Author: Ajay Kumar  02 Feb 2011   Member Level: Silver   Points : 0

Guest Author: Usama Zia   30 Apr 2012

well i remember some kind of code when i was a used to lock the folder which cannot be deleted and cann0t be viewed unless we enter the command prompt and den go to the location and enter those keywords..i dont really remember what it was as i jsut remember to type 3 numeric values while pressing the ctrl button or alt i dont remember far as i remember it was really awesome...cant even format the drive unless the same numeric values are pressed in the command prompt to unlock that was kinda password protection..if u get it n u know something about it then do tell us...thanks..

Guest Author: karan rai   01 May 2012
This is very nice tip. If any one known that folder is password protected he trying to break up so it is good to disappear..


Post Comment:

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)

    Type the numbers and letters shown on the left.

    Submit Article     Return to Article Index
    Subscribe to Subscribers
    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Talk to Webmaster Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India