How to Lock Folder Through CMD

112,417

39

33

About: Follow Me for A Gr8 Ride Of tech...

This Trick Will Show You That How To Lock Folder Through CMD.

I had Written Some Codes In Notepad and Save As .bat File To make It for a DOS.

The Codes are given in STEP:#3

The provided Codes has Some Parts in which the User's name and password is mentioned, so you can change that in your own way you want. (described in STEP:#3)

I HOPE YOU LIKE IT USERS!

Follow ME To Know Some More Stuff Like this And Miscellanious Tips Nd HAcks...

SURF IT! LEARN IT! SHARE IT!

LOVE CMD! oR NOTEPAD! (Uhhh...the Same thing till used as .bat)

(MS-DOS FOR BEGINNERS): I Would also Like to Mention That Batch Programming is the Easiest/Funniest & Interesting thing To Know About, so just try to read my codes line-by-line and just try to understand the way that codes carried out for their action otherwise Read Books For your Reference or Just Google And Follow Some Of the Best Forums, Blogs Nd all...

Step 1: #1

Step 2: #2

Step 3: #3

SO THE CODES ARE HERE:

cls
@ECHO OFF

title Folder Locker

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

if NOT EXIST secured goto MDLOCKER

:CONFIRM

echo Are you sure u want to Lock the secured(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 secured "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

attrib +h +s +r +i "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

echo secured locked

goto End

:UNLOCK

echo put in the key to Unlock the lock

set/p "pass=>password"

if NOT %pass%==123456 goto FAIL

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

ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" secured

echo secured Unlocked

goto End

:FAIL

echo Invalid keyword

goto UNLOCK

:MDLOCKER

md Secured

echo lock unlocked

goto End

:End

NOTE: In 23rd Line You can see the default password i.e., 123456 , so just change this to the password you want.


- So Just write The Codes In a same Way it is written And Save as "all file" type with file name lock.bat or anything.bat

OH! Wait! Some Of You Find it Difficult To write! i Guess, Okay! Download iT From here:

http://www16.zippyshare.com/v/57113048/file.html


Step 4: #4

Step 5: #5 (See Description Too)

Bug: Some Of The Users Told Me That during This Step #5 when we lock the folder, the folder is still seen...

Bug Fixed: So Just Refresh (Press Ctrl+F5) it once in desktop or in the location where you are trying to lock that file...

Step 6: #6

Tech Contest

Participated in the
Tech Contest

First Time Author Challenge

Participated in the
First Time Author Challenge

5 People Made This Project!

Recommendations

  • Planter Challenge

    Planter Challenge
  • Classroom Science Contest

    Classroom Science Contest
  • Growing Beyond Earth Maker Contest

    Growing Beyond Earth Maker Contest

33 Discussions

0
None
karthik kumarc

Question 1 year ago

Here the attrib is not recognized coming

0
None
keksig

2 years ago

if you could move it to another folder and when you unlock the folder it is in the same location as it was before the script

1 reply
0
None
keksigkeksig

Reply 2 years ago

like system32/drivers/etc

0
None
AayushV1

3 years ago on Introduction

What if some tries to edit .bat file by right clicking -> edit.

now someone else can see our password and can even change it

2 replies
0
None
keksigAayushV1

Reply 2 years ago

you can convert it to exe-file

0
None
TraskyAayushV1

Reply 3 years ago

You put in a whole lot of useless code that explodes their brain when they read it.

0
None
KevBotC

3 years ago

Hi i was wondering how you could change the name of the folder.

1 reply
0
None
keksigKevBotC

Reply 2 years ago

ren "folder curret name" new name

0
None
farahxxeiger1689

Reply 2 years ago

how to know if its hidden or not? how do you check?

0
None
farahxx

2 years ago

thanks i made it!

0
None
JaimeE23

2 years ago

You're great man! Thanks a Lot!

0
None
luckymoon

2 years ago

I can't make it :(

0
None
Batchcc

3 years ago

this is unsafe all I have to do is open cmd in the same folder as the batch file (shift right click) and type attrib -s -h to view the files.

0
None
Blurryface21

3 years ago

Hey i made a really good folder locker with VBScript, if anyone wants it email me at raxhonPlex@yandex.com

0
None
GhostStreakG

3 years ago

how do I it to lock a folder

0
None
TarunG9

3 years ago

don't know what i would do without you