how to password protect your folder

Discussion in 'Tutorials' started by agaitu, Dec 5, 2007.

  1. agaitu

    agaitu Banned

    i would like to share "how to password protect the folder using dos"

    Follow these instruction.

    1. Open Notepad and copy the code below
    2. Change your password in the code it's shown the place where to type your password.
    3. Save file as locker.bat
    4. Now double click on locker.bat
    5. I t will create folder with locker automatically for you. After creation of the locker folder, place the contents you want to lock inside the locker folder and run locker.bat again .

    <---The code, copy the whole thing---->

    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

    Yeah, you can save you private data for free but here the catch, you can edit your password by right clicking the bat file and select "edit". In order to prevent someone changing your password, try change the file name and extension such as "system.dat".
  2. Jesse

    Jesse Active Member

    Nice Tutorial. But why don't use programs that password protect folders i think there are a lots for free and some are not free.
  3. QuwenQ

    QuwenQ New Member

    I'll stick with TrueCrypt. :)
    But thanks, nice Tutorial, if you wrote it.
  4. Swiblet

    Swiblet New Member

    This is using the same tactic that Microsoft uses to password protect the System Restore files, huh? Sounds like it. This is very useful, but I find locking programs much easier, and I'm a lazy person. Thanks for the info, though =)

    ~~B3N
  5. DaveDaDon

    DaveDaDon New Member

    Well um. This is useless if you have "SHOW ALL HIDDEN FILES & FOLDERS"

    but its kinda cool though
  6. Sohail

    Sohail New Member

    That's pretty neat!
  7. manzoor

    manzoor New Member

    hey nice tut probably will be trying it

Share This Page