How to Lock a Folder on Windows

Part 1 of 4:

Creating a Lock File

  1. How to Lock a Folder on Windows Picture 1
    Press Win+E. This opens the File Explorer.
  2. How to Lock a Folder on Windows Picture 2
    Double-click the folder you want to lock. This opens the contents of the folder.
  3. How to Lock a Folder on Windows Picture 3
    Right-click an empty part of the folder. A menu will appear.
  4. How to Lock a Folder on Windows Picture 4
    Click New. A list of file types will appear.
  5. How to Lock a Folder on Windows Picture 5
    Click Text Document.
  6. How to Lock a Folder on Windows Picture 6
    Type lock and press Enter. You now have a text file called 'lock' in the current folder.
  7. How to Lock a Folder on Windows Picture 7
    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. How to Lock a Folder on Windows Picture 8
    Open a web browser. You can use any web browser on your computer, such as Edge, Chrome, or Firefox.
  2. How to Lock a Folder on Windows Picture 9
    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. How to Lock a Folder on Windows Picture 10
    Scroll down to the code that begins with 'cls @ECHO OFF.' The code begins right after the 6th step in the article.
  4. How to Lock a Folder on Windows Picture 11
    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. How to Lock a Folder on Windows Picture 12
    Return to the 'lock' file that's open in your text editor. The file should be blank.
  6. How to Lock a Folder on Windows Picture 13
    Click the mouse cursor in the file and press Ctrl+V. The copied code will appear in the file.
  7. How to Lock a Folder on Windows Picture 14
    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. How to Lock a Folder on Windows Picture 15
    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. How to Lock a Folder on Windows Picture 16
    Click the File menu. It's at the top of the window.
  10. How to Lock a Folder on Windows Picture 17
    Click Save As….
  11. How to Lock a Folder on Windows Picture 18
    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. How to Lock a Folder on Windows Picture 19
    Change the file name to FolderLocker.bat. To do this, erase what's already in the 'File name' field and type FolderLocker.bat.
  13. How to Lock a Folder on Windows Picture 20
    Click Save. Now you're ready to password-protect your files.
Part 3 of 4:

Locking the Folder

  1. How to Lock a Folder on Windows Picture 21
    Double-click FolderLocker in the File Explorer window. This creates a new folder called Locker in the current folder.[2]
  2. How to Lock a Folder on Windows Picture 22
    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. How to Lock a Folder on Windows Picture 23
    Double-click FolderLocker. This opens a black window that asks, 'Are you sure u want to lock the folder (Y/N).'
  4. How to Lock a Folder on Windows Picture 24
    Press Y.
  5. How to Lock a Folder on Windows Picture 25
    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. How to Lock a Folder on Windows Picture 26
    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. How to Lock a Folder on Windows Picture 27
    Double-click FolderLocker. A black window will appear, asking you to enter the password.
  3. How to Lock a Folder on Windows Picture 28
    Type the Locker password and press Enter. This brings back the Locker folder, which is now accessible.
5 ★ | 1 Vote

May be interested

  • How to lock Windows 11 PC via Bluetooth connection with Dynamic Lock featureHow to lock Windows 11 PC via Bluetooth connection with Dynamic Lock feature
    through a security feature called dynamic lock, you can easily set up your pc to automatically and securely lock when you leave your workplace, without having to completely shut down the system.
  • How to protect folders with Secure Folder?How to protect folders with Secure Folder?
    in the process of using the computer, you will have important folders and files that need to be kept secret, avoiding the curiosity of others when they use the device. therefore, the solution here is to use security software. there are many different but popular, easy-to-use security software, including subisoft secure folder. with it, you can lock, hide or encrypt the entire folder.
  • How to disable Lock Screen lock screen on Windows 8, 10How to disable Lock Screen lock screen on Windows 8, 10
    on windows 8 and windows 10, lock screen lock screen allows users to select any image as wallpaper as well as display the date and time on the screen when logging out of windows. however, when logging back into windows, users are forced to use the mouse to bypass this lock screen lock screen.
  • Lock folders, set folder passwords, folders easily and safelyLock folders, set folder passwords, folders easily and safely
    lock folders, set folder passwords, folders easily and safely. on every computer, we always have different important data. and especially the private data that you don't want strangers to get into. but you still do not know how to lock a blind
  • How to set the default name of a newly created folder according to the current date on Windows 10How to set the default name of a newly created folder according to the current date on Windows 10
    by default, when you create a new folder in windows 10, that folder is automatically named 'new folder'. there is absolutely no problem with this name, but you do not like it and want to use the current date itself as the folder name for easy management, just follow these steps.
  • How to enable the auto-lock feature when users leave - Dynamic Lock on Windows 10How to enable the auto-lock feature when users leave - Dynamic Lock on Windows 10
    dynamic lock is one of the new features integrated on windows 10 creators update version. this feature automatically locks the computer every time a user leaves his or her desk. it can be said that this is one of the extremely useful security features on windows 10.
  • What does the red 'X' on Windows folders mean?What does the red 'X' on Windows folders mean?
    do you see a red circle with a white cross to the left of your windows files, folders, or drives? if so, it means onedrive isn't syncing and the folders affected by this issue aren't syncing properly.
  • How to disable the Caps Lock key in Windows 10How to disable the Caps Lock key in Windows 10
    windows doesn't offer any easy to find or use options to disable the caps lock key. however, by using free software like autohotkey or registry tricks, you can disable the caps lock key on windows 10.
  • How to change the download folder Windows Update in Windows 10How to change the download folder Windows Update in Windows 10
    by default, the windows 10 update is downloaded to the softwaredistribution folder on drive c and hidden in windows 10. moving the folder will not be as simple as usual and need to be logged on as an administrator. the new folder used in this tutorial is newupdatefolder located in drive d. you can change the name and location to anywhere you like.
  • Instructions to delete Windows.old folder on Windows 7/8 / 8.1?Instructions to delete Windows.old folder on Windows 7/8 / 8.1?
    usually after you reinstall windows without deleting the old partition, windows 7/8 / 8.1 will appear a new folder in drive c with the name windows.old. what is that? that is the folder containing all the system files of the old windows version, when not deleted, the system will automatically collect all in one folder and name it windows.old.