How to Lock a Folder on Windows

This wikiHow teaches you how to hide files in a secret locked folder in Windows 10. Press . This opens the File Explorer.

Part 1 of 4:

Creating a Lock File

  1. Picture 1 of How to Lock a Folder on Windows
    Press Win+E. This opens the File Explorer.
  2. Picture 2 of How to Lock a Folder on Windows
    Double-click the folder you want to lock. This opens the contents of the folder.
  3. Picture 3 of How to Lock a Folder on Windows
    Right-click an empty part of the folder. A menu will appear.
  4. Picture 4 of How to Lock a Folder on Windows
    Click New. A list of file types will appear.
  5. Picture 5 of How to Lock a Folder on Windows
    Click Text Document.
  6. Picture 6 of How to Lock a Folder on Windows
    Type lock and press Enter. You now have a text file called 'lock' in the current folder.
  7. Picture 7 of How to Lock a Folder on Windows
    Double-click the 'lock' file. This opens the blank file in your default text editor (e.g. Notepad). You'll need to paste some code into this file.
Part 2 of 4:

Adding the Lock Code

  1. Picture 8 of How to Lock a Folder on Windows
    Open a web browser. You can use any web browser on your computer, such as Edge, Chrome, or Firefox.
  2. Picture 9 of How to Lock a Folder on Windows
    Navigate to https://www.laptopmag.com/articles/password-protect-folder-windows-10. This is the site from which you can copy the code.[1]
  3. Picture 10 of How to Lock a Folder on Windows
    Scroll down to the code that begins with 'cls @ECHO OFF.' The code begins right after the 6th step in the article.
  4. Picture 11 of How to Lock a Folder on Windows
    Copy all of the code. To do this, click the mouse before 'cls' and then drag it all the way to the end of the code, then press Ctrl+C.
  5. Picture 12 of How to Lock a Folder on Windows
    Return to the 'lock' file that's open in your text editor. The file should be blank.
  6. Picture 13 of How to Lock a Folder on Windows
    Click the mouse cursor in the file and press Ctrl+V. The copied code will appear in the file.
  7. Picture 14 of How to Lock a Folder on Windows
    Locate and highlight Your-Password-Here. If you're having a hard time finding it, press Ctrl+F to open the Search tool, type your-password-here into the box, then press Enter. The text should automatically highlight.
  8. Picture 15 of How to Lock a Folder on Windows
    Type a lock password. Since Your-Password-Here is highlighted, it will disappear once you start typing your lock password. The password you type is the one you'll need to enter to access the folder.
  9. Picture 16 of How to Lock a Folder on Windows
    Click the File menu. It's at the top of the window.
  10. Picture 17 of How to Lock a Folder on Windows
    Click Save As….
  11. Picture 18 of How to Lock a Folder on Windows
    Select All Files from the 'Save As type' drop-down menu. It's the first drop-down menu at the bottom of the window.
  12. Picture 19 of How to Lock a Folder on Windows
    Change the file name to FolderLocker.bat. To do this, erase what's already in the 'File name' field and type FolderLocker.bat.
  13. Picture 20 of How to Lock a Folder on Windows
    Click Save. Now you're ready to password-protect your files.
Part 3 of 4:

Locking the Folder

  1. Picture 21 of How to Lock a Folder on Windows
    Double-click FolderLocker in the File Explorer window. This creates a new folder called Locker in the current folder.[2]
  2. Picture 22 of How to Lock a Folder on Windows
    Drag the files you want to lock to the Locker folder. Dragging files to this locker will also remove them from their current folder.
  3. Picture 23 of How to Lock a Folder on Windows
    Double-click FolderLocker. This opens a black window that asks, 'Are you sure u want to lock the folder (Y/N).'
  4. Picture 24 of How to Lock a Folder on Windows
    Press Y.
  5. Picture 25 of How to Lock a Folder on Windows
    Press Enter. The window will disappear, as will the folder called Locker. Don't worry, it's still there—you'll just have to run the FolderLocker script to make it visible.
Part 4 of 4:

Accessing Files in the Locked Folder

  1. Picture 26 of How to Lock a Folder on Windows
    Double-click the folder where you created the Locker. You can do this from the File Explorer at any time.
    1. This is the folder that contains the file called FolderLocker.
  2. Picture 27 of How to Lock a Folder on Windows
    Double-click FolderLocker. A black window will appear, asking you to enter the password.
  3. Picture 28 of How to Lock a Folder on Windows
    Type the Locker password and press Enter. This brings back the Locker folder, which is now accessible.
Update 04 March 2020
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile