Pinterest Stumbleupon Whatsapp
Ads by Google

These days, hiding or locking a folder or file is probably something you will need if you use a computer that others use too.

A previous post has been written on this topic here 2 Ways to Hide "Important" Files and Folders in Windows 2 Ways to Hide "Important" Files and Folders in Windows Read More but I have found a few other methods of doing such a thing, excluding download programs that can be easily accessible to others.

Here are five other methods:

Windows

Method 1 (the easy one)

    1. Click “Start”, “Run,” and then type cmd. When the command prompt opens type “CD C:Test” (replace “Test” with the name of the folder you want to hide.)

    2. Now type “attrib file +s +h” and replace “file” with the name of the actual file name you would like to hide.

    3. Now, go back to C:Test and look for your file or folder, it’s not there! You cannot find it through simply browsing around, through the command prompt, or even if you click “Show Hidden Files and Folders”.

    4. To find the folder and it’s contents again simply go back to the command prompt, type “CD C:Test” (of course, again replacing “Test” with the name of the folder,) and then type “attrib filename -s -h”. You should now be able to find your file again!

Method 2 (this is where it starts to get slightly more difficult)

This method, unlike the previous one, hides an entire drive instead of individual files or folders:

Ads by Google

(Before you ever use the registry I HIGHLY RECOMMEND backing up your registry with a tool similar to Registry Tool or CCleaner. You may as well use a manual method similar to this.)

    1. Go to “Start,” “Run,” and type regedit.

    2. When the registry editor loads, navigate to: HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersion
    PoliciesExplorer

    3. Right click on “Explorer” and select “New” and “DWORD Value.”

    4. Name the value NoDrives and select “Decimal” as the base.

    5. In the value type the number that corresponds with the drive below:

    (E.g. If you would like to hide drive E, type 16. You may also hide multiple drives by adding the two numbers. E.g. If you would like to hide drives E and G, 16+64=80.)

    6. Now, after you restart your computer, you should not be able to see the drive.

Method 3

    1. Create a folder in a drive for easy access, e.g. C:. (Name it something related to the Control Panel, e.g. Users.)

    2. Create a new file in Notepad and copy and paste the following into it:

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

    3. Replace “Users” with the name of the folder you created and save the file as loc.bat.

    (You should now be able to see your folder and the loc.bat file, with the loc.bat in the same directory as the folder Not in it.)

    4. Now, right-click and create another text file. Copy and Paste the following into it:

    ren Users.{21EC2020-3AEA-1069-A2DD-08002B30309D} Users
    (Make sure to replace the word “Users” with the name of your folder.)

    5. Save it as key.bat.

    6. Now you should see the loc.bat and the key.bat files in the same directory as the folder you created.

    7. Now, all you need to do is double-click on the loc.bat file and the folder should have an icon that looks like the control panel. If you click on the folder it should redirect you to the Control Panel and thus you have locked the folder.

    8. Of course, to unlock it, simply double-click on the key.bat file and the folder should turn back into the folder you first created.

    lock files in windows

Method 4

This final method allows users to hide files in a JPEG image:

hide files in JPEG

    1. Create a folder in C:, e.g. C:Folder1.

    2. Put all the files you want to hide in there, as well as a JPEG image that you would like to hide the files in.

    3. Select all of the files you want to hide, and create a ZIP or RAR file with them using a program like WinRAR, WinZip, 7Zip, etc.

    4. Now you should have your archive next to your files that you want to hide, even though they are in the archived file already, with the JPEG image you would like to hide all of this in.

    5. Go to “Start,” “Run,” and type: cmd.

    6. Now type: cd , then type: cd Folder1. (Of course, replace Folder1 with the name of your folder.)

    7. Type the following: copy /b myimage.JPG + archivedthing.rar myimage.jpg

    (Note: Replace the name “myimage” with the name of your image, and replace “archivedthing” with the name of your compressed file.)

    8. You should receive a response similar to the following: “1 file(s) copied.”

    9. To find the files in your image, all you need to do is right-click on the image and select “Open With…” and select “WinRAR” or the name of the program you used to archive the original files.

    Windows Hide folders

    Hide files in Windows

Mac

Now, for Mac users it is different. The following method can be used for Unix-like systems, thus Macs.

Method 5

    1. Create a folder in your “Home” directory through your directory by typing the following: mkdir .myfoldername The folder has to have a dot before it. E.g. .myfoldername.

    2. Go to your home directory and click “Go” then “Go to Folder.” Type the following: ~/.myfoldername.

    3. You should now be able to put stuff in your hidden folder.

    (Note: Finder remembers your previously typed folders.)

What other methods do you use to hide a folder, a file or a drive?

  1. Tommy
    October 20, 2016 at 1:49 pm

    I used Gilisoft File Lock Pro to hide folders

  2. George
    January 2, 2010 at 10:12 am

    Why so mus\ch fuzz - use winzip to zip the files (all files in a folder)with a password - works on all OS

  3. tom
    November 8, 2009 at 4:35 am

    Gili File Lock pro is a power file encryption software program that can quickly and safely lock and hide files, folder,and drives,and it can use 256-bit AES encryption (Encryption Standard Adopted by the US Government) to protect your files located on HDD drive or any portable media such as USB drives.

  4. Folder Guard
    October 19, 2009 at 4:34 pm

    Method 6: save yourself the trouble and get software specifically designed to do the job, such as our Folder Guard.

  5. rob
    October 18, 2009 at 7:53 am

    soory, it did not work can you please tell me what is the folder name i need???

  6. Guru
    July 9, 2009 at 11:23 pm

    Thanku very much

    • naveed
      July 22, 2009 at 7:32 am

      If somebody deletes the lock.bat $ key.bat files in the method 3 . I think its better to use a software.

  7. Guru
    July 9, 2009 at 11:21 pm

    realy it's helpfull.

    Thanks

  8. farooq
    July 8, 2009 at 3:08 pm

    thanks man.......it works..... thumbs up for ya.......:)

  9. ranim
    May 9, 2009 at 3:03 pm

    ay , i have the same prob, i ve done the install i run it and its working but when i shoose any of the choices nothing happen....i am intrested to know how dis lock will works

    thanks

  10. Binod
    April 12, 2009 at 4:43 am

    Very useful script. I like it. have added in my blog too.

  11. Binod
    April 12, 2009 at 4:41 am

    Good Tips. I am very happy and satisfied with the tip. Have added to my blog too! Thanks guys.

    • rob
      October 18, 2009 at 7:52 am

      Can any one please tel me what is the folder name i need to selact

  12. sagayaprabhu
    February 14, 2009 at 2:43 am

    very nice its very use full to so that we can save the folder as our security so that we can save any type files in that folder

  13. Bruno
    January 22, 2009 at 7:18 am

    HI everyone! Here is a simple script to manage your folder security.

    IT has the following FEATURES:
    - LOCK a Folder / LOCK a Folder and hide it.
    - UNLOCK a Folder
    - UNHIDE a Folder / UNHIDE a folder and UNLOCK it.
    - You can lock/unlock a folder of your choice. Just type in the folder name.
    - You can UNHIDE a hidden folder of your choice, but you need to know the name of the folder you are going to UNHIDE.
    - MENU

    Just copy and paste the code below in notepad and save it as filename.bat and then run it. That’s it!

    You’re free to copy and modify the code and sell it if you want.
    - BRUNO
    ===========================================

    @ECHO OFF
    title LOCKA FOLDA
    :MENU
    echo **LOCKA FOLDA MENU**
    echo L - Lock a folder
    echo U - Unlock a folder
    echo H - Unhide a hidden folder (Make sure you know the folder name)
    echo A - About this program
    echo X - Exit
    echo Enter your choice:
    set/p “chois=>”
    if %chois%==L goto BEGINLOCK
    if %chois%==l goto BEGINLOCK
    if %chois%==U goto UNLOCKF
    if %chois%==u goto UNLOCKF
    if %chois%==H goto BEGINUNHIDE
    if %chois%==h goto BEGINUNHIDE
    if %chois%==A goto ABOUT
    if %chois%==a goto ABOUT
    if %chois%==X goto END
    if %chois%==x goto END
    :UNLOCKF
    cls
    echo Please enter the folder you want to UNLOCK:
    set/p “lockfldr=>”
    :UNLOCKF2
    if EXIST %lockfldr%”.{ECF03A32-103D-11d2-854D-006008059367}” goto UNLOCK
    if NOT EXIST %lockfldr%”.{ECF03A32-103D-11d2-854D-006008059367}” goto UNLOCKNOTFOUND
    :BEGINLOCK
    cls
    echo Please enter the folder you want to LOCK:
    set/p “fldr=>”
    if EXIST %fldr% goto LOCK
    if NOT EXIST %fldr% goto LOCKNOTFOUND
    :BEGINUNHIDE
    cls
    echo Please enter the folder you want to UNHIDE:
    set/p “lockfldr=>”
    if EXIST %lockfldr%”.{ECF03A32-103D-11d2-854D-006008059367}” goto UNHIDE
    if NOT EXIST %lockfldr% goto END
    :LOCK
    ren %fldr% %fldr%”.{ECF03A32-103D-11d2-854D-006008059367}”
    goto DONELOCK
    :UNLOCK
    ren %lockfldr%”.{ECF03A32-103D-11d2-854D-006008059367}” %lockfldr%
    goto DONEUNLOCK
    :DONELOCK
    echo %fldr% has been successfully locked!
    echo Would you like to hide this folder?[y/n] :
    set/p “chide=>”
    if %chide%==Y goto HIDE
    if %chide%==y goto HIDE
    if %chide%==N goto DONELOCK2
    if %chide%==n goto DONELOCK2
    :DONELOCK2
    echo Would you like to lock another folder?[y/n] :
    set/p “dlock=>”
    if %dlock%==Y goto BEGINLOCK
    if %dlock%==y goto BEGINLOCK
    if %dlock%==N goto MENU
    if %dlock%==n goto MENU
    :DONEUNLOCK
    echo %lockfldr% has been successfully unlocked!
    echo Would you like to unlock another folder?[y/n] :
    set/p “dlock=>”
    if %dlock%==Y goto UNLOCKF
    if %dlock%==y goto UNLOCKF
    if %dlock%==N goto MENU
    if %dlock%==n goto MENU
    :UNLOCKNOTFOUND
    echo %lockfldr% Folder not found!
    echo Would you like to try again?[y/n] :
    set/p “unotf=>”
    if %unotf%==Y goto UNLOCKF
    if %unotf%==y goto UNLOCKF
    if %unotf%==N goto MENU
    if %unotf%==n goto MENU
    :LOCKNOTFOUND
    echo %fldr% Folder not found!
    echo Would you like to try again?[y/n] :
    set/p “notf=>”
    if %notf%==Y goto BEGINLOCK
    if %notf%==y goto BEGINLOCK
    if %notf%==N goto MENU
    if %notf%==n goto MENU
    :AFTERUNHIDE
    echo Would you like to UNLOCK this folder?[y/n] :
    set/p “afthide=>”
    if %afthide%==Y goto UNLOCKF2
    if %afthide%==y goto UNLOCKF2
    if %afthide%==N goto MENU
    if %afthide%==n goto MENU
    :HIDE
    attrib +h +s %fldr%”.{ECF03A32-103D-11d2-854D-006008059367}”
    echo %fldr% is now hidden! Please take note of the folder name because you will need it to unhide the folder.
    goto DONELOCK2
    :UNHIDE
    attrib -h -s %lockfldr%”.{ECF03A32-103D-11d2-854D-006008059367}”
    echo %lockfldr% is now visible!
    goto AFTERUNHIDE
    :ABOUT
    echo +—————–+
    echo ¦ LOCKA FOLDA ¦
    echo +—————–+
    goto MENU
    :END


    ================================================
    MABUHAY PINOY!

    • subramanya teja
      March 10, 2009 at 1:43 pm

      It's not working for me.... It's giving a message goto was unexpected at this time as soon as i select any choice

    • Treeza
      June 23, 2009 at 12:11 pm

      hey i have make a batch file but when i run it ..it asks for the option . i hv just entered option but it not works..how it works?where we should give the name of folder which we want to lock?

    • Guru
      July 16, 2009 at 4:07 am

      Hello Bruno,
      This is Guru from India pune.
      Regarding Folder Lock by script.
      i'am trying to lock folder by your script to manage folder security, and iam creating Bat file but when i run this script then it will open and giving opposition for " Enter your choice " and when's i chose opposition and Enter then script closed automatically. What should i do?
      pls can u help me on this.

      Regards,
      Guru
      +91 9890147466

  14. P
    January 2, 2009 at 4:26 pm

    I've always thought the extension trick works best :P

    though.... there are some programs a tech savvy person could use to find what it originally ran with.

  15. Rahul sharma
    December 29, 2008 at 5:46 am

    these methods are good…but i think its better to download programs to hide files

  16. Bro'
    September 11, 2008 at 10:44 am

    You can also disguise wav's and img's by changing the (dot)something to any other format.

  17. Comment... they never stop
    September 11, 2008 at 10:41 am

    Thank u :D

    (used nr.2)

  18. death
    July 30, 2008 at 9:53 am

    if you want 2 get a little more difficult you could use method for a different way.

    instead of going the easy route and making a new folder in drive c just figure out how 2 find a folder you all ready have

    type this into cmd to find say the Documents folder

    cd\
    cd users
    cd owner
    cd documents

    and u'll get a command line that looks something like this
    C:\Users\Owner\Documents\>

    im pretty sure it'l work on other computers but this is just the way i went about figuring it out!
    happy testing and never stop learning

    in case ure wondering it took me all of maybe 2 minutes to figure this out! lol

  19. Nik
    July 1, 2008 at 10:07 am

    Is there a free windows program that will password protect folders?

  20. Mackenzie
    June 28, 2008 at 10:45 pm

    The dot is not a Mac thing. That is an old, old UNIX convention. We Linux users do that too. We're not dumb enough to think it's actually securely hidden, though, because ls -a always tells otherwise.

    • makka
      February 5, 2009 at 7:18 pm

      Yes, but if you name it something simple yet scary (ls -a is pretty well known among 7-year-olds in my community) like ".hard-drive-encryptor" or ".osx-base-code" and put it in the Hard Drive itself rather than your Home folder, it's not as obvious. Also, if you put several dummy folders like that with several more dummies in there, most people will just give up.

  21. James
    June 28, 2008 at 5:44 pm

    If I ever want to hide something, I put the file in a password protected rar file and remove the file extension. Throw in a random name and bury it in the system files and it is good for most things.

  22. Ashwin CS
    June 28, 2008 at 5:32 pm

    Method 4 can also be used to upload and share Mp3 and Video files using image hosting/sharing sites like flickr or Picasa, just copy the mp3 or video file using the above method and upload.

    • death
      July 30, 2008 at 9:54 am

      u sly dog! good thinkin'

  23. mm
    June 28, 2008 at 2:38 pm

    method one doesn't work correctly, I can still see the hidden folders in windows explorer...but in the cmd it doesn't appear

    • Jason
      June 28, 2008 at 4:00 pm

      Yeah, method one just marks it as a system file. All you have to do to see it is make Windows show "protected operating system files."

      This is like hiding your pr0n mags by pasting them inside the cover of Better Homes and Gardens. Not Recommended.

      • Rut
        November 10, 2009 at 3:21 pm

        I am not computer savy at all, what is the raw bones easiest way for me to hide a file on my computer? It is very important that this particular file be hidden. Please make the explanation very 1,2,3 ish that I can impliment.Thanks, Rut

    • subramanya teja
      March 10, 2009 at 1:23 pm

      U can see them in command prompt also if use dir /a

Leave a Reply

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