Windows

How To Lock Folder Using Notepad

How To Lock Folder Using Notepad

In this tutorial we will guide you about “How To Lock Folder Using Notepad?”. There are many software in the market that claims to lock your Windows Folders, some of them are free and other are paid. The problem with them is that they can’t be unlocked without that Software using which you have locked it before, for ex. You installed the Folder locker software and locked one of your folder in your Pendrive; now you want to use your Pendrive in another computer and want to open exactly the same folder which is locked, now you can’t open it unless you have the Software installed in this computer as well.

Well, this time here at TechLinu we are going to share a tutorial for Windows users to lock their computer using batch programming (code). Don’t worry we have written the code already for you, what you need to do is to follow the tutorial.

Open Notepad

First of all open Notepad from Startmenu

Copy and Paste (the easy part) 🙂

Just copy and paste the following batch programming code to notepad:

[box type=”note” align=”” class=”” width=””]

@ECHO OFF

title TechLinu.com

if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK

if NOT EXIST MyFolder goto MDMyFolder

:CONFIRM

echo Are you sure to lock this 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 MyFolder “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 Your Secure Folder

set/p “pass=>”

if NOT %pass%== TechLinugoto FAIL

attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”

ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” MyFolder

echo Folder Unlocked successfully

goto End

:FAIL

echo Invalid password

goto end

:MDMyFolder

md MyFolder

echo MyFolder created successfully

goto End

:End

[/box]

Save It

Now save the Notepad file as folderlocker.bat (Be sure to save it as All files)

Open the tiny software you have just made

Double click on folderlocker.bat file

A new folder named “MyFolder” will be created. Now move your all content to this folder.

All files Locked

Done! Double click on locker.bat file and it will ask you for locking folder. Type Y and hit enter.

Refresh and your folder will disappear which means it’s locked.

Now How to Open it back?

Wait… That’s easy! Double click on folderlocker.bat File and now it will ask for password.

By default the password is TechLinu. Enter it and your folder will appear as normal. That’s it Hope You Liked the article 🙂

How To Lock Folder Using Notepad?

Previous ArticleNext Article
TechLinu.com – is a computer & technology resource website. TechLinu provides up to date tutorials on computers, smartphone, games, cyber security, internet, programming, Linux, windows and how to blog and make money online.

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge

Good NEWS! TechLinu.com gone green, we've moved to SSL (HTTPS) to provide our users a secure experience.Report Problem
+