If you don’t know how to put a password on a file on Windows 10, we are going to help you out. For this task, we can opt for third-party programs or alternative methods.
How to put a password on a file on Windows 10 without any programs?
At the moment there is no way to protect files with a password without using programs in Windows. The only way to do this is to place all the files you want to lock in a folder.
The next thing to do is to create a text document on the Desktop by right-clicking on the wallpaper. Then copy-paste the following lines into the .txt document:
title Folder Private
if EXIST “HTG Locker” goto UNLOCK
if NOT EXIST Private goto MDLOCKER
echo Are you sure you want to lock the folder (Y / N)
set / p “cho =>”
if% cho% == Y goto LOCK
if% cho% == and goto LOCK
if% cho% == n goto END
if% cho% == N goto END
echo Invalid choice.
ren Private “HTG Locker”
attrib + h + s “HTG Locker”
echo Folder locked
echo Enter password to unlock folder
set / p “pass =>”
if NOT% pass% == PASSWORD_GOES_HERE goto FAIL
attrib -h -s “HTG Locker”
ren “HTG Locker” Private
echo Folder Unlocked successfully
echo Invalid password
echo Private created successfully
It should look like this:
The next thing we will have to do is to replace the text string PASSWORD_GOES_HERE with the password we want to use to protect the files. In the image above we have replaced the string with the word “techbriefly”, although we can use any string as long as it does not contain a space.
Then, save the file with the Save As option that we can find in the File menu. In the pop-up window that will appear, we will select the All files option to save the document with an extension other than the RTF extension. In the Name field we will enter the following text:
If everything went well, the document will be saved as an executable file instead of as a plain text document. Now we will only have to execute the file in question by double-clicking on LOCKER.bat. It will automatically generate a folder with the name Private.
Inside this folder, we will have to store the folder we have previously used to gather all the files we want to hide. We can also transfer the files to the folder directly without going through a secondary folder.
The last step to lock the contents of the Private folder with the password we have previously set is based on running the LOCKER.bat file again. The difference with respect to the first time is that this time we will be shown a black window that will ask us if we want to lock the contents of the folder with a password.
To accept the operation, type the letter Y and press Enter. Finally, the Private folder will disappear from the Desktop. If we want to access the contents of the folder we will have to execute the file LOCKER.bat and write the password that we have configured in the original document.
It should be noted that this method is easily bypassed. In fact, it is enough to edit the LOCKER.bat file with Windows Notepad to know the password. It is advisable to save the file in question in a folder difficult to find.
How to put a password on a file on Windows 10 using WinRAR?
If you want to opt for third-party programs, WinRAR is the best option. The good thing about WinRAR is that once the trial period is over we can continue using the program normally.
After downloading and installing the program, select the file or folder you want to protect with a password and right-click on the item in question. Then click on the Add to file… option.
Now we will only have to select the compression format (RAR, RAR4 or ZIP) and check the option Lock the file. Finally, click on the Set password button to set a password.
In the Enter password pop-up window, check the Encrypt filenames option to further enhance the security of the archive. The last step is to click OK to save the archive in RAR, ZIP or RAR4 format with a password.
Since there are some more or less functional methods to remove the password from an archive protected by WinRAR, we recommend combining this method with the first one to make the archive invisible to outsiders.