Trick to lock your private folder

Suppose you want to lock the folder games in d: which has the path D:Games.In the same drive create a text file and type in it(without the quotes):
“ren games games.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
Now save this text file as loc.bat

Create another text file and type in it(without the quotes):
“ren games.{21EC2020-3AEA-1069-A2DD-08002B30309D} games”
Now save this text file as key.bat

Now you can see 2 batch files loc and key.Press loc and the folder games will change to control panel and you cannot view its contents.Press key and you will get back your original folder.
try it out!!!!!!!

Important note:How to rename your text files as bat files?

Just go to my computer->tools->folder options->go to the view tab.
Now uncheck the ‘Hide extensions for known file types’.Press apply.
Now rename ur text files as bat files.

Note:If you find this post useful or other posts on this site useful you can bookmark it(press ctrl+D).Any comments are welcome.

42 thoughts on “Trick to lock your private folder”

  1. when i do it it shows loc nd key bat file.if i want to hide that that loc nd key file den what i have to do.other ouestion is i m doing same for locking windows in C.but it is not working here.

  2. hey buddy only d person who knows about it can unlock it and moreover it works even after renaming the loc & key files u can give these files any name u want

  3. i’m typing the same word u given in post but it not working as i’m trying it with my new folder and new contented in it. pls explain as i found it as very help full to me.

  4. @raju

    For eg,you want to lock the folder
    songs in c:/collection/songs.
    Just go to c:/collection and there besides the folder songs create 2 text files and write
    ren songs songs.{21EC2020-3AEA-1069-A2DD-08002B30309D}
    in the first one and save it as loc.bat and write
    ren songs.{21EC2020-3AEA-1069-A2DD-08002B30309D} songs
    in the other and save as key.bat

    Note:You can use any names for these bat files.
    Now you shud be able to see 2 batch files besides songs folder.Click on loc and folder will change to control panel icon
    and press key to get the folder back.

  5. @abhishek

    Well abhishek,obviously you would have gone wrong somewhere…coz this trick definitely works.
    Just check your code again that you write in the notepad files…make sure you replace games in the example with the name of the folder you are trying to lock on your pc.Try again and let me know.By the way which os are you using?

  6. Hi tries as mentioned, I could lock it but nor unlock it for some reason, I tried more than once by copying ren games.{..}. I did change the folder name and looked into all, but in vain.

  7. @Ace

    Well if you could lock your folder then certainly, you should be able to unlock it too.
    Remember your key.bat file should be besides your locked foler when you are trying to unlock.
    And the code in the key.bat file should contain the name of your locked folder.Games was just an example.
    Tell me if you receive furthur problems.

  8. hello everybody ,this is nice trick
    but if i could know that in the bracket{…..}some numbers are using that it can be change or without it ,it can be lock.
    Thanks .

  9. hey kartik thankx……it really works .but the no. u provided seems to convert the file into control panel.what if we want anything else than control it possible…?

  10. @saurabh

    Hi saurabh,
    Yes it is Indeed possible to change the icon to something other than the control panel.Here are the keys to do so:

    {20D04FE0-3AEA-1069-A2D8-08002B30309D} – Turned to Explorer
    {0DF44EAA-FF21-4412-828E-260A8728E7F1} – turned to start menu properties
    {6DFD7C5C-2451-11d3-A299-00C04F8EF6AF} – Turned to Folder Options
    {7007ACC7-3202-11D1-AAD2-00805FC1270E} – Turned to Network Connections
    {D20EA4E1-3957-11d2-A40B-0C5020524152} – Turned to Fonts Folder
    {D6277990-4C6A-11CF-8D87-00AA0060F5BF} – Turned to Shedule tasks
    {E211B736-43FD-11D1-9EFB-0000F8757FCD} – Turned to Scanners & camera

    {645FF040-5081-101B-9F08-00AA002F954E} – Turned to Recycle bin

    {2227A280-3AEA-1069-A2DE-08002B30309D} – Turned to Printers Folder

  11. hey i have same the problem man I can lock it but i cannot unlock it to get my original folder back for some reason, good i tried this with a sample folder otherwise i wud have locked a important folder
    i also wanted know can i keep the key.bat file in some other folder.
    can u help me out ?

  12. @anuj

    I will look into this problem of not being able to unlock a folder.I have never faced such a problem and neither have many readers of my blog.It is just that 1 or 2 such cases have come up.I will surely look into this.

    And for the key.bat file,yes you can put it anywhere on your Pc,in any folder.You can hide it somewhere if you like.

    But to unlock a folder key.bat should be placed adjacent to your locked folder.Only then will it work.

  13. When i tried to lock a folder in My Briefcase which is inside my Documents on an XP machine then nothing happened. Otherwise the same combination works. Is there any clue why I am not able to lock the folder.

  14. hi i created 2 dat files…i want to hide C:Documents and Settingssan.SYSMy Documents…in this only i created tht dat files…whn i clicked on loc.dat file…its asking open with/cancle buttons…plz clarify…

  15. hi,
    this works for all.but one thing i want to know is how do we get the hex values for the control panel, recycle bin etc. and is it possible to map the folder which is to be hidden to another existing folder?


  16. @harish

    Here are the other hex values that you might like to use

    {20D04FE0-3AEA-1069-A2D8-08002B30309D} – Turned to Explorer
    {0DF44EAA-FF21-4412-828E-260A8728E7F1} – turned to start menu properties
    {6DFD7C5C-2451-11d3-A299-00C04F8EF6AF} – Turned to Folder Options
    {7007ACC7-3202-11D1-AAD2-00805FC1270E} – Turned to Network Connections
    {D20EA4E1-3957-11d2-A40B-0C5020524152} – Turned to Fonts Folder
    {D6277990-4C6A-11CF-8D87-00AA0060F5BF} – Turned to Shedule tasks
    {E211B736-43FD-11D1-9EFB-0000F8757FCD} – Turned to Scanners & camera
    {645FF040-5081-101B-9F08-00AA002F954E} – Turned to Recycle bin
    {2227A280-3AEA-1069-A2DE-08002B30309D} – Turned to Printers Folder

    You can get all these values from the registry if you look a little here and there,they are very easy to find out.

    For your second question,yes it is possible to map your hidden folder into any other folder.But keep in mind that to unlock you must place the bat files adjacent to your hidden folder.

  17. gr8 stuff man!!!!!
    my question is what happens when either lock.bat or key.bat is removed, shifted or deleted.

  18. Well,you can easily lock your folder and hide your key.bat file somewhere in your pc.Then whenever you want to unlock just put the key.bat file in the same directory as your locked folder and execute it.
    Even if you accidently delete the key.bat file,you can create it again.There will be absolutely no problem !!

  19. i’m really sorry to say the same thing again.. im able to lock the folder.. but not able to unlock it… could not do it even when i have the key.bat file in the same folder adjacent to games folder… i’ve checked everything.. using windows xp sp2….

  20. hey kartik,

    i think
    in ur formula there is some mistake

    in key file u have to place a space after those number than u have to write folder name

    it could be like this…

    ren games.{645FF040-5081-101B-9F08-00AA002F954E} games

  21. ya i know it doesnt work on vista….and as of now i dont have any idea of making it work there…coz I dont have Vista myself to try and experiment…sry dude…try some oder thing in vista

Leave a Reply

Your email address will not be published. Required fields are marked *