HomeTipsLock File(s) on Windows Without Using Any Software

Lock File(s) on Windows Without Using Any Software

How many times have you wished of a software using which you can hide or lock files,  restricting its access to other unwanted users. Although there are various software available in market using which you can easily lock/hide files but, i personally dont trust them because most of them are bloatware or spyware.

In this post i am going to share a simple yet powerful way of locking and hiding important files using a the following method. Follow the instructions to make you own Locker ( Without any software !! ) :

  • Open notepad.
  • Copy the following code in notepad file :

    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%==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
  • Change the “YOUR PASSWORD HERE” with your password.
  • Save it as batch file ( with extension .bat ) For eg. Locker.bat
  • Now you will see a batch file. Double click it to create a folder locker ( A new folder named Locker would be formed at the same location )
  • Thats it you have now created your own locker and that too without using any software !
  • Brings all the files you want to hide in the locker folder.
  • Double click the batch ( As created above ) file to lock the folder namely Locker.

Folder lock

If you want to unlock your files, simple double click the batch file again and you would be prompted for password ( In DOS window ). Enter the password and enjoy access to the folder.

66 COMMENTS

  1. thanks it work after i change txt extension to Bat, but not so safe… a smart people must be know, they can just change the file back to the txt extension then they can see the Password…

  2. LOL!!
    ARE YOU CRAZY!!
    YOU HAVE MADE THE HIDING PROCESS TOO DIFFICULT
    THIS CODE JUST HIDES THE FOLDER AND ONE CAN EASILY ACCESS THE FOLDER BY JUST CHECKING THE SHOW HIDDEN FILES OPTION.
    NO WONDER IN THIS.

  3. replace the word locker with you required name in the whole coding and then save it with extension *.bat
    it will work

  4. i tried it it work just for a day. the following day when i open MyFolder..whoaa! my files were gone missing… what will i do? please… i need that file folder with sub-folder… please… i just download a recovery apps (if i mistakenly deleted my files) .. but still it doesnt work. please help.

  5. Using an online batch to exe converter, people can’t edit the batch file. Also, if you search for the file while it is locked, you cannot open it.

  6. and one more think for not deep thinker it is totally yours only you can change password and edit password no matter of losing data to other guy who already knows about this trick no one can edit Locker.bat because it will be not there anymore for edition. but powerful software may harm ur data in locker folder so be careful from those softwares

  7. Hi my friends I after deep thinking i found the best way to lock your data in Locker folder u just created by notepad trick here the another trick i am gonna share with you all my friends and Greatfully thanks to Brother Paritosh the Locking trick now u learn my trick
    when you made locker folder by the notepad trick and locked it with data in it and password protected instantly delete the Locker.bat and remove from recycle bin also now leave computer to another user and tell him u have hidden some data in Locker folder and chalenge him to find it out show him the way also but believe me he can’t find because data is totally hidden now ur turn to find it out make the same Locker.bat file there where it previously was and open it u will be asked to enter password which u locked ur locker folder before deletion previously booom u accessed all data u locked

    Thank to me guys i am Think Tank

  8. Here’s a question. Couldn’t you just change the permissions on the file, using your computer’s admin account/password (as anyone should have, if they want to have a secure computer), and make it so that others could only read & execute/read? I mean, if they weren’t allowed to modify and write, then they can’t exactly change anything.

  9. if you delete the file you use to open hidden file just make another notepad file with the code above and put it in the same place it was before then it will open your hidden file

  10. One way of avoiding change of password is if u rename the extension .bat to sys.. This way the person will not know this is the file to change.. Whenever you wana see ur files back, change it to .bat again, enter password, enjoy..
    However, it isnt very useful coz if we turn on the “show hidden files” from Tools->Folder options, The file pop up anyways.. Password.. Or no password..

    Regards…

  11. You’ve pointed out the issues which would have been taken care of had this been a ‘real’ way to protect your files. What I shared above is just for fun!

  12. Sir this is a nice one! Bravo!

    But,

    if the location of the batch file is simply where the file is, isn’t it a little too easy to anticipate for others to open the batch file and replace the password?

    i mean is there any way you could also lock the batch file? so it can’t be edited that easy?

    and is there any way we to hide the password as we type it? like asterisks? cause i can see it as i type it…

  13. You mean in dialog box? I don’t think so. BTW I am not a programmer of any sort so please take help of someone who’s good with that 🙂

  14. Dear Mr. Paritosh
    Hope you’ll be fine
    I have only one question regarding the lock folder without any softwere. Is it possible that when we are going to enter password and it shows only stericks (***) instead of alphabets

    Thank You

    Have a Great Day for You

    Shakir Afridi.

  15. by link i mean like if you put in the wrong password it opens the matrix code .bat file thing.
    hope thats clear enough to understand…..

  16. Is there anyway to link this to the matrix code thingy that u mentioned in another post/
    btw. love this. works perfectly (perfectly enough for my purposes anyway)

  17. to see the locked and hidden file, you just have to uncheck the ‘Hide protected system files(recommended) box in Folder Option

    you will see the file named ‘Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}’

    to see what in this ‘Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}’ file, just rename the file to anything you like

    you now can open the file and see what inside it

  18. This isn’t very secure. Someone could simply load the file into Notepad and change the password themselves.

    Cool trick though

  19. The code mentioned above is working perfectly fine. I believe you didn’t copy the entire code properly. And my friend you should first make sure you have done the things right before blaming others 🙂

  20. This doesn’t work! It shows: Error code ‘911’ Invalid character: 2 Line:2. Fucking Shit you wasted my life’s 5 minutes! Paritosh Sux!

  21. what if some one deleted the .bat file?
    and you can right click to the .bat file and change the password or see it. so whats the use of loking…?

  22. It isn’t a secure way of hiding your data but certainly works. As far as editing of .bat file is concerned, you can make it read only and/or password protect it in a rar file.

  23. I think what red4oy is asking is if it’s secure being that all someone has to do is right click on the .bat file and click edit to see what the password is. Is there a way to keep them from doing that, which I doubt.

  24. cant you go in to edit the password you made? would this cancel the usefulness of the password altogether? is there a way to change this so you cant change the passcode you create?

  25. thanks you so much bro. its work.
    is its fully save????
    plz tell me more tricks to how to unlock vista password. user password plz

  26. It works perfectly fine…. However, what will happen if we delete the .bat file after locking the folder?? We won’t be able to retrieve the folder!!

  27. This program works just fine i think u people may not have the file working on you’re computer because this file sometimes does not work on windows 7 and thankyou for the file

  28. Alright, I got everything set up.
    But what am I suppose to do when I lock it up?
    It asks me if I want to lock it and then I type in “Y” but….nothing happened. So then I pressed “Enter” right after typing “Y” and still nothing changed.
    I double clicked on the batch file and it asked me the same question “Do you want to lock this folder?”
    lol….it’s trying to fool me I think….

  29. This works with .bat extension only. I have tried this and it is working though it doesn’t works on some machine’s running windows 7.

  30. this didnt work when i tried as bat file ,but as a program file(.exe) said it was illegal so i give

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Recent Articles

3,016FansLike
0FollowersFollow
32,600FollowersFollow
2,270FollowersFollow
18,000SubscribersSubscribe