loading

The following steps is a great way to put a password on any USB flashdrive. The following is a .bat file and fairly simple to make. [Only works on windows]

WARNING:

I am not responsible for any lost and corrupted files. I highly suggest you back up your files before continuing. USE WITH CAUTION

Step 1: Move Your Folders

First, plug in you drive, and go to your flash drive folder. Then create a folder. Lets name this folder "Lock." Now move all your flash drive folders into "Lock" Make sure "Lock" is still on the flash drive.

Step 2: Hide Your Folder

First open CMD (if you don't know what this is and want to learn check out my instructable on it) type in "g:" then hit enter and type "attrib Lock +s +h" (if you have a different folder name instead of "Lock" use the name of your folder) this should now make you folder "disappear" The folder is now invisible. Although still accessible, it cannot be seen unless the specfic folder path is seen.

Step 3: Actual Batch Coding

Open notepad and paste the following script:

____________________________________________________________________________________

@echo off
title Orange Shadow's Folder Lock set pass= passwordlock

color a

echo----Enter Password----

set /p ui= if %ui%==%pass% (goto open)

echo Wrong Password pause

exit :open start Yo

_____________________________________________________________________________________

There are two variables here: pass, and where it says "set pass=passwordlock" change passwordlock to what you want your password to be.

Next, "open start Yo" change to the name of what your new folder's name is.

save this script as a .bat file (again, if you want to learn more about bat files you can check out my instructable) in the folder you wish to

Step 4: Voila

Now, whenever you attempt to access the folder on the drive, you'll have to go through a secure password first.

Step 5: Turning Into an .exe

The thing about having a .bat file is that you can easily edit the coding, making it accesbile to anyone. really Making this entire project more of a novelty than anything else.

However, There is a solution. Turning the .bat in a .exe (executable program).

To do this click this link here and download the program (or use any other .bat to .exe converter you wish). Follow the procedures, and you should be set.

<p>I got the password box working.. My question is, how would i hide the letters of the password under astrix, so someone behind me or walking by when i access the password box does not see my password?</p>
<p>before the set/p... insert 1 row with xxx color ef xxx and in correct and wrong answer insert one row in between color 0 when entering password the screen goes yellow and text is white, you will not see anything, type the password and you should be good, btw insert xxx pause xxx after xxx echo ---enter password--- xxx ps i added my batch file as image http://prnt.sc/f0qih4</p>
I too had this question, but unfortunately, I don't think it is possible. Batch is a pretty simple language, and of course has it's limitations, this being one of them. Thanks for checking out my instructable!
pahelp naman po pls. sa thesis namin need po namin ng codes para malock ung external hard drive then dapat di pwede mareformat hanggat mali ung password. thank you ??
<p>Folder Lock is a convenient tool to add password to any folder on Windows. The steps are simple and the protection is quite secure. You can follow the steps in here: <a href="http://www.imoresoft.com/folder-lock.html" rel="nofollow">http://www.imoresoft.com/folder-lock.html</a></p>
<p>Hi, I was viewing this and made flether-1's version a little easier to use</p><p>@echo off</p><p>title Drive Locked </p><p>color 2</p><p>:0</p><p>echo================= &amp; echo Enter Password &amp; echo ================</p><p>set /p password=</p><p>if %password%==YOURPASSWORDHERE goto :1</p><p>echo Wrong Password</p><p>pause</p><p>goto :0</p><p>:1 </p><p>echo Success! </p><p>pause</p><p>(START \YOURFOLDERNAMEHERE)</p>
<p>i used this code. thanks bro. </p>
<p>File Folder performs better than the above tool because it has a much cleaner user interface instead of command line. You can check out: <a href="http://www.imoresoft.com/folder-lock.html" rel="nofollow">http://www.imoresoft.com/folder-lock.html</a></p>
<p>Fixed his code and made some adjustments if anyone is interested. Just change the bold &quot;test&quot; to whatever you want your password to be and change the E:\Files to the drive letter and folder name.</p><blockquote>@echo off<br></blockquote><blockquote>title Drive Locked <br>color b<br>echo================= &amp; echo Enter Password &amp; echo ================<br><br>set /p password=<br>if %password%==<strong><em>test</em></strong> (START E:\Files)<br><br>echo Wrong Password pause<br><br>exit :Files</blockquote>
<p>i encounter error.. &quot;Enter is not part of external or internal command&quot; :'(</p>
<p>where do i need to save the notepad i created? do i need to have the program installed?</p>
<p>i am stuck on step 2 please help</p>

About This Instructable

124,909views

36favorites

License:

Bio: Ming DeMers Senior Director of Fuel Ignition Division Jet Propulsion Laboratory 4800 Oak Grove Dr, Pasadena, CA 91109
More by Orange Shadow:Make Your Computer Faster by Installing Chromium OS 5$ AC Unit The Keyless Keyboard 
Add instructable to: