How to lock a folder and file without any software through using notepad?


There are many third party software are present on internet to lock and hides your files and folders on your pc. But they are causes some hidden errors in your pc and you lost your data when they are deleted and uninstalled  from your pc. To prevent these types of errors and prevent your data loss we use this trick to lock your files and folders through using notepad codes and command prompt. It is safer then third party softwares Because it is a windows program  not a third party application. So let’s start this trick.

Step-1  first open notepad in your computer, now copy the below given code and paste it into notepad you open recently.

Remember:- you can change the password by editing only one value in below given code.

you can replace your password instead of TECHNOHELPER24 you will put your desired password in between the below code.

@ECHO OFF
title Folder Private
if EXIST “PRO HACKER 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 “PRO HACKER LOCKER”
attrib +h +s “PRO HACKER LOCKER”
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p “pass=>”
if NOT %pass%== TECHNOHELPER24 goto FAIL
attrib -h -s “PRO HACKER LOCKER”
ren “PRO HACKER LOCKER” Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End

Step-2  Save this file named as lock.bat in a drive.

Step-3  After save your file now you will be run the lock.bat at the saved location , now a folder named ‘private’ will automatically open in the same directory.

Step-4  Now put your  file which you want to protect in the  “private” folder. Now double click on the lock.bat file and now it will ask you “Are you sure you want to lock the folder[Y/N]”.

Step-5  Now type Y to hide the folder and then press enter key , now your folder  “private ” will be in hidden state.

Now to show your hidden file or folder in the directory  follow given below step:-

Step-6  Now double click on the lock.bat file then it will ask you to unlock password.                           Now type your password such as TECHNOHELPER24.

This is one of the best trick to protect your date without any third party software. To know about more tricks read my blog.

2 thoughts on “How to lock a folder and file without any software through using notepad?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s