How to Lock Or Hide A Folder, A File Or A Drive On The Computer

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 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?

Join live MakeUseOf Groups on Grouvi App Join live Groups on Grouvi
Stay Incognito On The Web
Stay Incognito On The Web
951 Members
Windows Tips
Windows Tips
548 Members
Windows_10
Windows_10
541 Members
Windows Troubleshooting
Windows Troubleshooting
467 Members
Best Windows Software
Best Windows Software
463 Members
Computer Hardware Talk
Computer Hardware Talk
423 Members
Online Security Tips
Online Security Tips
416 Members
Tips for Privacy Obsessed
Tips for Privacy Obsessed
292 Members
Mac OSX Tips & Issues
Mac OSX Tips & Issues
229 Members
Mac Troubleshooting
Mac Troubleshooting
90 Members
Affiliate Disclamer

This article may contain affiliate links, which pays us a small compensation if you do decide to make a purchase based on our recommendation. Our judgement is in no way biased, and our recommendations are always based on the merits of the items.

For more details, please read our disclosure.
New comment

Please login to avoid entering captcha

Log In