This video will show you how to protect your folder with a password batch file in Windows 10. It includes the following:
- Folder Password Protection
- FolderLock.bat
- Batch Files
Password protected folder Windows 10
You can easily lock any folder on your Windows 10 PC with a simple batch file, created in Notepad. Using a batch file allows you to assign a password to a folder that you want to be locked – you can even hide the folder instead of just password protecting it, and make it reveal itself or its contents only by entering the master password. It’s a great trick for anyone who needs to safeguard important information or files that he/she doesn’t want to be accessed by other users. The trick also works on every version of Windows but not prior to Windows 95.
There are many other software applications out there that are capable of locking folders and files in a more convenient way, they protect your data with a password, and can also encrypt your data:
- FSPro utilizes a feature called My Lockbox – where you can store your private files in a folder that is protected with a password.
- There is also Hide Folders 5 – allows the user to hide, lock and password protect files.
That being said, some users prefer not to download extra third party software to lock their files and folders. Here is a step-by-step guide to how you can password protect your folder/folders without having to install anything else – by creating a batch file in the native Windows environment using Notepad:
How to password protect a folder in Windows 10
Open Notepad and enter the following script:
cls @ECHO OFF title Folder Locker if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK if NOT EXIST Locker goto MDLOCKER :CONFIRM echo Are you sure u want to Lock the folder(Y/N) set/p "cho=>" if %cho%==Y goto LOCK if %cho%==y goto LOCK if %cho%==n goto END if %cho%==N goto END echo Invalid choice. goto CONFIRM :LOCK ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" echo Folder locked goto End :UNLOCK echo Enter password to Unlock folder set/p "pass=>" if NOT %pass%==TYPE_YOUR_PASSWORD_HERE goto FAIL attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker echo Folder Unlocked successfully goto End :FAIL echo Invalid password goto end :MDLOCKER md Locker echo Locker created successfully goto End :End
- After pasting the text into Notepad, change the password to your liking where it says “TYPE_YOUR_PASSWORD_HERE“.
- Save the Notepad document as a batch file with the .bat extension.
- Close the window and run the batch file. It will create a new folder called Locker.
- Put all the files you want to be locked into the password protected Locker folder.
- Open the batch file and it will ask you to lock the folder.
- Click Yes and your folder should now be password protected.