table of contents
Encrypting a file or folder is usually easy with a program. Encryption is often required, especially for devices intended for public use. In general, encryption is divided into programmatic or not. With a popular program like ForderKey, it’s just one click away. However, there are methods available to those who are not sympathetic to installing programs. This is a way to encrypt a folder without a program with Windows’ own function. As a method that can be used in Windows 7 or Windows 10, the principle is to add a password function by creating a BAT file using a TXT file.
Prepare files or folders for encryption
Prepare files for encryption
You can encrypt files and folders without a program. First, prepare a file or folder to be encrypted. You can prepare it in the same folder. If this method is inconvenient, you can easily encrypt it using a program such as FolderKey.
Create a text file
Creating a new text document
Please create a new text document to encrypt. Just click the right mouse button in the folder > New > Text Document button.
Insert text for batch file
Please enter the text in the References below. This document acts as a program to encrypt files and folders.
batch file settings
Setting the batch file password
You will see something called ‘Your-Password-Here’ in the file. Enter the password you want to enter here. The length of the password does not matter.
Saving the batch file FolderLocker.bat
After entering the password, click the Save As button. When saving, you must enter ‘FolderLocker.bat’.
How to encrypt a file folder
Executing the BAT file
After saving is complete, if you run the FolderLocker file, a Locker folder is created. This space will be the folder to be encrypted.
Moving/Copying Data for Encryption
Move the files/folders you want to encrypt to the Locker folder.
Encryption setting by running FolderLocker
After moving, if you run the FolderLocker.bat file once again, it asks if you want to encrypt it. Please enter ‘Y’ here. Then the encryption is completed and the Locker folder is encrypted and disappears.
How to unlock password
Running FolderLocker
Decryption (decryption) is simple. This is to make the encrypted and disappeared folder visible again. Conversely, run the ‘FolderLocker.bat’ file.
Enter the password you set
To unlock, simply enter the password you entered earlier.
Encrypted Folder Recovery Success
You can check the Locker folder only when the password is entered normally. Complete password lock and unlock without a dedicated program.
FAQ
You can encrypt using the basic functions of your Windows. You can encrypt the folder by making the TXT file a BAT file. Just put the file to be encrypted in the folder.
If the folder password cannot be locked with Windows' own function, try using the program. There are programs with simple and powerful performance.
To unlock the encryption using Windows' own BAT file without a program, run the previously created 'FolderLocker.bat' file and enter the password.
Reference
- Documentation for FolderLocker batch files
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%==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