How to Lock Folder Through CMD

105,121

39

31

Posted in TechnologyComputers

Introduction: How to Lock Folder Through CMD

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

5 People Made This Project!

Recommendations

  • Make it Move Contest

    Make it Move Contest
  • Woodworking Contest

    Woodworking Contest
  • Microcontroller Contest

    Microcontroller Contest
user

We have a be nice policy.
Please be positive and constructive.

Tips

2 Questions

Here the attrib is not recognized coming

31 Comments

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

like system32/drivers/etc

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

you can convert it to exe-file

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

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

1 reply

ren "folder curret name" new name

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

thanks i made it!

You're great man! Thanks a Lot!

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.

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

don't know what i would do without you

I found this in youtube but they were not clear and the videos quality was so low and it's making me crazy ... but you are a real man ... no lies ... no hiding steps ... no short steps to makes the reader unable to understand ... you made it clear and sample as it's suppose to be ... thanks and I'm glad to successfully that thing by your tech ...