How to lock Folder and Files without any software


Lock your personal file by using simple batch program.
At the last of this post Free skype credit promotion has been given

Difficulty: Easy

This easy tutorial will walk you through how to hide and protect folders with password. So that nobody can access these files without knowing the password you specified. This trick is based on Batch Programming. You Only need Notepad which is already installed on your Windows computer by default. There are many numbers of software for protecting your personal file with password. Most of them is vulnerable amd we can easily hack those locked file using simple trick.

Previously I posted :

How to Hack locked folder without knowing password

Lock personal file trick:

  • First open Notepad.exe .
    Press Windows key+R to open RUN window. Now write notepad .
  • Now copy and paste the following Batch program to notepad window.
  • cls 
    @ECHO OFF 
    title Folder Private 
    if EXIST "HTG Locker" goto UNLOCK 
    if NOT EXIST Private goto MDLOCKER 
    echo Are you sure you 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 
    ren Private "HTG Locker" 
    attrib +h +s "HTG Locker" 
    echo Folder locked 
    goto End 
    echo Enter password to unlock folder 
    set/p "pass=>" 
    if NOT %pass%== PASSWORD_GOES_HERE goto FAIL 
    attrib -h -s "HTG Locker" 
    ren "HTG Locker" Private 
    echo Folder Unlocked successfully 
    goto End 
    echo Invalid password 
    goto end 
    md Private 
    echo Private created successfully 
    goto End 
  • Press CTRL+F and find this PASSWORD_GOES_HERE and replace it with your own password.
  • Now press CTRL+S to save the file. Select Desktop to save it in Desktop. Give Filename as private.bat . Select Save as type to “All files” .
  • lock-folder-without-software

  • Now close Notepad and navigate to your Desktop. You will see a file private.bat . Double click on it . A new folder will be created by this batch program named “Private“. Close the batch program.
  • Now move your all personal files to this folder i.e. Private.
  • Again right click on private.bat and it will ask you following:
  • Are you sure you want to lock this folder?
    press Y and press ENTER key.

    lock folder without software1

  • Now the folder is hidden and locked by password. If you want to Unlock this folder double click on private.bat and type your password and press ENTER key.

lock folder without software 2

End of the story: This is a simple trick to lock any folder by using a password. But this trick can be easily hacked too. Think how can you hack this folder and unlock file without knowing password and comment below.


As soon as new article is published it will be sent to your E-mail Inbox


  1. I tried all the steps described above but when i got to the part which says “You will see a file private.bat . Double click on it . A new folder will be created by this batch program named “Private“, i didn’t get any new folder created ! I tried clicking on the private.bat couple of times, but i got nothing. My laptop is HP Stream 13 with windows 8.1 and 64-bit

    Robel Gidey

    • Hi Robel,
      Thank you for your comment. Unfortunately there was a bug on the code. I have just updated it. Could you please check it now? I am sure it will work now

  2. Sumit Ranjan Mishra says

    Aren’t you just simply hiding it? I mean, I switched on “View Hidden Files” and I found the folder just sitting there with a different name.

  3. Soyal Dominic says

    Just right click on the batch file and open it with notepad. There we can find out the password.

Speak Your Mind