How To Password Protect Any File Using Notepad
Having a password for unlocking a windows PC is simple these days.and it is actually done by everyone. But what if i say we lock a folder by keeping a password. yes, if you need to see that folder , then you need to input password and later you can access the contents of the folders. so here in this article i will tell you the whole process using notepad. You just need to follow these steps and you will know How To Password Protect Any File Using Notepad.
Steps to password protect any file using notepad:
First of all, you have to open notepad and copy the following code below and you can change the password with your desired one you just need to edit this line “if NOT %pass%== Infogalaxy goto FAIL” . You can replace “Infogalaxy” with your password.
@ECHO OFF
title Folder Private
if EXIST “Infogalaxy Locker” goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you 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 Private “Infogalaxy Locker”
attrib +h +s “Infogalaxy Locker”
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p “pass=>”
if NOT %pass%== Infogalaxy goto FAIL
attrib -h -s “Infogalaxy Locker”
ren “Infogalaxy Locker” Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End
Now save as Folderlock.bat file.
You have to run that Folderlock.bat file at the saved location, now the folder named private will be created.
Now copy your files which you want to lock with password to private folder and then again run Folderlock.bat file and it will ask you “do you want to lock (Y/N), then type y and then hit enter.
After typing y and hitting enter, private folder will get hidden.
Again run Folderlock.bat file and it will ask you password which you have given, type it there your password and unlock your files.
That’s it. Now you can lock any file or folder using notepad.