Folder Lock in XP Without Software

Using this piece of code you can lock and unlock any number of folders in XP.

Whats the beauty of this code is, no software installations are required. So, no virus problems or spyware or malware problems.

The steps on how to make this work is specified at the bottom of this code. So, go thru it once. And, follow it to secure your files.

cls
@ECHO OFF
title Folder Locker
if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u want to Lock the folder(Y/N)
set/p “cho=>”
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p “pass=>”
if NOT %pass%==type your password here goto FAIL
attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End

* Now paste it in notepad.

* Change the “type your password here” with your password (Marked as bold in the above posted matter).

* Save it as batch file(with extension .bat).Any name will do.

* Now you see a batch file. Double click it to create a folder locker.

* A new folder named Locker would be formed at the same location.

* Now brings all the files you want to hide in the locker folder.

* Now double click the batch file to lock the folder namely Locker.

* If you want to unlock your files,double click the batch file again and you would be prompted for password.Enter the password and enjoy access to the folder.

The credit for this code goes to its original developer. This is not my creation. And, the original programmer is unknown to Me.

Just provide a comment whether this tip had been useful to you and I would welcome if you can share tip up your sleeve. Thanks.

30 thoughts on “Folder Lock in XP Without Software

  1. dear frend
    without going on for this long and hectic codeu can do it with just the key lines of these codes
    well i dnt know how it works but i got it from sum1’s blog
    and it needed only two lines and saving it to bat format.
    y ny1 wud go for this hectic code wen u can do it with just two lines in notepad
    RAJ

  2. Step1 : Open a Notepad and Type
    ren myfolder myfolder.{21EC2020-3AEA-1069-A2DD-08002B30309D}
    save this text file as “lock.bat”

    Step2 : Open a Notepad and Type
    ren myfolder.{21EC2020-3AEA-1069-A2DD-08002B30309D} myfolder
    Now save this text file as “key.bat”
    this code is far more simpler try this once u will hav all ur doubts cleared
    RAJ

  3. @ james
    now which file r u talking of, the bat files perhaps?
    one way is to either keep the bat files on two diff locations,so nobody knows abt them, wenevr u want to access locked files u bring both lock and key bat files to their original locations and open it. and even if sum1 deletes it u can always hav the codes frm here and again create a lock and a key bat files and again unlock it…………
    lemme know if any queries…

  4. @james
    basic thing is tht u hide those bat files in ur system files or program files so tht no body gets it.
    u can also change the names to make it look more like system files such as system32.dll etc etc so tht no body gets the slightest idea….
    bring them to their original place wen u want to access them and again hide them in ur system folders…….

  5. Hi,, pls help me anybodoy..
    i have using the above folder locker programme and it’s gr8. but i have notice onething if anybody wants to know the password which we typed in “type your password here” coloumn just right click the batch file and go through edit they can get. so please inform me how can solve this.

    regard
    girish
    ttgirish@gmail.com

    • no need correct password to open this .bat exc ,just open this .bat file and type any word in this .bat exc…….

      u have another one option to lock this folder quickly,
      How it:
      first lock one Privet file by.bat exc. then after,right click the .bat exe file and add to archive with winrar password…..

      this is good way and enjoy it ……

  6. this is an easy to use script,
    you can turn it into a exe program so you cant change the password but,if you use a script with another passord the folder wil be visable again, so that wont help.
    even if jou dont have a script you can acces te folder by changing your folder settings reaveiling all system folders and showing hidden files you can find your map in the beginning of your drive.

  7. BUT right click mouse than edit….and changes or see password…bad tips.it can not lock my folder fully…

    BUT right click mouse than edit….and changes or see password…bad tips.it can not lock my folder fully…

    BUT right click mouse than edit….and changes or see password…bad tips.it can not lock my folder fully…

    BUT right click mouse than edit….and changes or see password…bad tips.it can not lock my folder fully…..

  8. cls
    @ECHO OFF
    title Folder Locker
    if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
    if NOT EXIST Locker goto MDLOCKER
    :CONFIRM
    echo Are you sure u want to Lock the folder(Y/N)
    set/p “cho=>”
    if %cho%==Y goto LOCK
    if %cho%==y goto LOCK
    if %cho%==n goto END
    if %cho%==N goto END
    echo Invalid choice.
    goto CONFIRM
    :LOCK
    ren Locker “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
    attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
    echo Folder locked
    goto End
    :UNLOCK
    echo Enter password to Unlock folder
    set/p “pass=>”
    if NOT %pass%== type your password here goto FAIL
    attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
    ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Locker
    echo Folder Unlocked successfully
    goto End
    :FAIL
    echo Invalid password
    goto end
    :MDLOCKER
    md Locker
    echo Locker created successfully
    goto End
    :End

    Try this it will solve the problem as of the above program.
    Njoy.

  9. Here the Method.

    Exactly Copy paste it In Note pad and save it as a Batch File

    Double click on batch file you have created and you will see a new folder on your desktop called “Locker”

    Now add the files you want to be locked in that folder.

    Double click on batch file you have created again, and it will ask you if you want to hide the folders

    Type Y For Yes. The folder will be locked and hidden.

    To unhide, double click batch file you have created , type in your password and press enter…

  10. WE KNOW THAT IF YOU EDIT IT.. YOU WIL SEE THE PASS..

    JUST HIDE IT AND GO TO FOLDER TOOLS AND THEN FOLDER OPTIONS

    AND CLICK VIEW…

    YOU WILL SEE IN THE TABLE “HIDE FILES AND FOLDERS”

    CHANGE IT TO “DO NOT SHOW HIDDEN FILES AND FOLDERS” AND THE .BAT FILES WILL NOT BE SEEN..

    THATS MY WAY TO LOCK A FOLDER..

  11. Plz help me out..
    As Iam unable to do dat..
    is der is any other way to lock or hide folder without any softwar..
    Iam using windows xp..
    plz plz Help me out..

  12. this is all bullshit, it doesn’t work at all, you can view the locker folder and also can delete it after locking it

  13. Hey Rajj.. Your code is too good and too smart but not working in command prompt.. am able to go into the locked folder and i can copy the content of it to some other folder and i can view that…

  14. hey i tried out ur code and a folder named Locker was created on clicking the “.bat” file. i copied the folder in the folder named Locker but it doesnt lock the file neither does it prompt me for a password what should i do??

Leave a reply to Password Protect Folders Cancel reply