Tv Shows > Howtos > How to Lock a Folder Using Notepad

How to Lock a Folder Using Notepad

February 5th, 2007

There are plenty of software which lock your folders, some are free, other costs a lot of money. Why you’ll waste time and money when you could do it with your notepad.

* Consider you want to lock a folder named PICS in your D:\, whose path is D:\PICS

* Now open the Notepad and type the following

ren pics pics.{21EC2020-3AEA-1069-A2DD-08002B30309D}

* Where pics is your folder name. Save the text file as loc.bat in the same drive.
* Open another new notepad text file and type the following

ren pics.{21EC2020-3AEA-1069-A2DD-08002B30309D} pics

* Save the text file as key.bat in the same drive.

Folder Lock notepad

Usage:

* To lock the pics folder, simply click the loc.bat and it will transform into control panel icon which is inaccessible.
* To unlock the folder click the key.bat file. Thus the folder will be unlocked and the contents are accessible.

That’s all.

Download Episode

Share and enjoy

Bypass 72 Minutes Limitation

Howtos

howto

  • Samuel Konger
    It does not work in Win7, it seems the command lines to be modified.
  • Hi, a bit off topic. but i would like to know what plugin do you use for the "Most Viewed" on your sitebar?

    thanks.
  • Jack Alexander
    I just use a small (free) program called Free Hide Folder from cleanersoft. Much simpler.
  • What is that GID/UID you're using? Also, how is this in any way secure?

    Further, how am I prevented from simply noting the path and using the legacy commandline program "type" to list the contents of the BAT file?

    Or even easier, simply dragging the BAT file to an open notepad program?
  • Loquacious I don't believe the point of this is to be secure, just simple.
  • AhBoon you can find a description and a download link for the plugin here.
  • Like Jared said.. The simplicity was the idea, not the security :)
  • Mr Black
    This is only a very, very simple way of doing it, but if you want to hide a directory filled with utilities and other goodies on the computer of a neophyte, doing this and hiding it will keep it fairly safe, until they evolve.
  • Gary
    This is not locking a folder it is renaming it. This article is misleading!!!!

    This is not a security measure, just an idea of someone that does not understand security and thinks that just renaming a folder secures it.

    You should consider doing some research into security before writing articles on locking things. Perhaps you shoould rename this post how to rename a folder in a really complicated way.

    Regards
    Gary
  • Very interesting, but too complex..
  • hotta shuji
    the process is one way. you can lock it but not re-open. can you check your script again?
  • Works, but you can still delete the folder and it takes you to the control panel.
  • Rajesh
    Hi Friends

    I dont think this as security, the folder can be deleted once if someone mislead and delete the file it cannot be replaced
  • davboz
    For hotta shuji, and anyone,.......
    I thought so too.Couldn't figure why I couldn't return my file to the way it was.Then,in my "key.bat" text, I noticed I left out a "space" after the end bracket.There is one space. After I entered the space, closed "key.bat" and clicked it, my file returned to normal. Whether or not this is worth using is another Q. Maybe yes? Maybe No.
  • sahasra
    Hi frndzz, actually i had created password for the folder as above procedure, but my frnd formatted the system by providing a back up for dat loc.bat , but now after formatting im not getting any file which was kept in this folder, so wt 2 do now, like i cant get my files....................
  • jinal
    but what to do if we want to open the file at another location.for e.g.open it in recycle bin
  • hi,
    pls.help me,how i can unblock my .bat file,i can forgot my password to intered in notepad,so please tell me how i can got it?plz tell me as erlier as possible.
  • Vezance
    very interesting.......not the method i mean. i was able to lock every folder except "pics" folder....any idea why?
  • thanks for this!! i needed to lock my folder bec someone kept deleting it! thanks! may i put this information in my multiply acct?
  • Quextion
    Hey, this does work and the post should be called "how to Lock a folder" because you do, you render a file inaccessible to most means of search and file browsing. Not only are the files hidden but they ar put in a place of non-activity so that they can't be used until you use a key.bat file. Lock: An appliance for fastening a door,(lock.bat) lid, etc., consisting of a bolt (or system of bolts) with mechanism by which it can be propelled and withdrawn by means of a key(key.bat) or similar instrument.
  • please tell some one, how can I download the software
  • Anonymous
    Well, this is not particularly secure, but once edited a bit and hidden, this can become a potentially powerful securing method
  • ranjith
    How to Lock a Folder Using Notepad:

    Nice idea that folder was converted as like control panel. After that folder act as like control panel.

    But I am able to view that files through internet explorer. Kindly tell me if you have any other way.

    I am waiting for your reply.

    Ranjith J
  • ranjith J
    Nice idea that folder was converted as like control panel. After that folder act as like control panel.

    But I am able to view that files through internet explorer. “When I convert that folder as zip”
    Kindly tell me if you have any other way.

    I am waiting for your reply.
  • ranjit, cucirca doesn't reply any more looks like :(
  • gregromblon
    try this my code to lock and unlock a folder without using any software

    @ECHO OFF
    title Folder Personal
    if EXIST "Impt.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}" goto UNLOCK
    if NOT EXIST Impt goto MDIMPT
    :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 Impt "Impt.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}"
    attrib -h -s "Impt.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}"
    echo Folder locked
    goto End
    :UNLOCK
    echo Enter password to Unlock folder
    set/p "pass=>"
    if NOT %pass%==TYPE THE PASSWORD goto FAIL
    attrib -h -s "Impt.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}"
    ren "Impt.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}" Impt
    echo Folder Unlocked successfully
    goto End
    :FAIL
    echo Invalid password
    goto end
    :MDIMPT
    md Impt
    echo Impt created successfully
    goto End
    :End href="#comment-179433">@ranjith
  • sanjay bajaj
    thankyou
  • ranjith J
    Hai gregromblon,

    Thanks for you tips. kindly explain to me how to use this command line. i just want to generate bat file or in command i need to write this whole content.

    Kindly educate to me it will be useful for me

    Thanks in advance.
  • Prabhakar
    How to create a password to lock the folder or file
  • Very interesting guys...
  • jon hoagie
    it is a lot better
  • jEZDIn
    Hi all,

    i have much better batch code for this:

    Pass code is not based in this bath file - When first turn this batch file you are need enter password - it will be stored in additional *.key file (it is system hidden file - not visible)

    Save this code like Lock.bat (recommended)

    Maybe look amazing because is not in one lineup, window is too small for my code :)

    Just copy and paste to notepad and save like Lock.bat
    ------------------------ CUT HERE ------------------------------------
    @echo off
    color c
    title Verification validity
    if exist Documents goto Locking
    if exist "Recycle Bin.{645FF040-5081-101B-9F08-00AA002F954E}" goto pass
    :password1
    color a
    cls
    title Enter your password (Requirement one word)
    :password
    cls
    echo.
    echo Please enter password:
    echo.
    set/p "passw=>"
    echo.
    echo.
    cls
    echo.
    echo Retype password:
    echo.
    set/p "passwo=>"
    if %passw%==%passwo% goto next
    cls
    echo.
    echo.
    echo ERROR! The passwords not equal . Please try again!
    echo.
    pause
    goto password
    :next
    if not exist reg.key goto ForwardDown
    attrib -h -s reg.key
    :ForwardDown
    echo %passwo% > reg.key
    attrib +h +s reg.key
    if exist Unlock.bat goto renaming1
    if exist Lock.bat goto continue
    msg %username% Error in code for folder create!
    goto end
    :renaming1
    ren Unlock.bat Lock.bat
    :continue
    md Documents
    cd Documents
    start. Documents
    goto end
    cls
    :pass
    if not exist reg.key goto password1
    set/p saved="
    if %check%==%saved% goto RunMove
    goto ERROR
    :ERROR
    cls
    echo.
    echo Unlock fail !!!
    echo.
    echo Remain two attempts !!!
    echo.
    echo Try again:
    echo.
    set/p "check2=>"
    if %check2%==%saved% goto RunMove
    :ERROR2
    cls
    echo Error again
    echo.
    :loop
    echo Remain one attempts !!!
    echo.
    echo Are you want to continue (Y/N)
    echo.
    set/p "choice=>"
    if %choice%==Y goto step
    if %choice%==y goto step
    if %choice%==N goto end
    if %choice%==n goto end
    echo Please press Y to continue and N for exit
    goto loop
    :step
    echo Enter password:
    echo.
    set/p "check3=>"
    if %check3%==%saved% goto RunMove
    goto end
    :RunMove
    attrib -h -s "Recycle Bin.{645FF040-5081-101B-9F08-00AA002F954E}"
    ren "Recycle Bin.{645FF040-5081-101B-9F08-00AA002F954E}" Documents
    cd Documents
    start. Documents
    cd..
    if exist Unlock.bat goto renaming2
    if exist Lock.bat goto goto end
    msg %username% Error in code for unlocking Dokuments
    goto end
    :renaming2
    ren Unlock.bat Lock.bat
    goto end
    :Locking
    ren Documents "Recycle Bin.{645FF040-5081-101B-9F08-00AA002F954E}"
    if errorlevel 1 goto message
    attrib +h +s "Recycle Bin.{645FF040-5081-101B-9F08-00AA002F954E}"
    if exist Lock.bat goto renaming3
    if exist Unlock.bat goto end
    msg %username% Error in code for locking Dokuments
    goto end
    :renaming3
    ren Lock.bat Unlock.bat
    goto end
    :message
    msg %username% Impossible locking Documents. Close all opened folders and try again!
    :end
    exit
    ------------------------- CUT HERE -----------------------------------
  • Samuel Konger
    Dear jEZDIn,
    It makes a lots of sense as in the earlier one the password can be seen easily by "right clicking" the .bat file and clicking edit. In this particular one since the password is hidden in system hidden file, it can't be taken out so easily unless system hidden files are shown.
    THANX
blog comments powered by Disqus



rss twitter


Top