How to Put a Password on Any USB Flashdrive
Intro: How to Put a Password on Any USB Flashdrive
The following steps are a great way to put a password on any USB flash drive. The following is a .bat file and is fairly simple to make. [Only works on windows]
This also works on regular windows files. Just adapt the steps to the folder you want to hide instead of the flash drive.
Warning:
I am not responsible for any lost and corrupted files. I highly suggest you back up your files before continuing.
STEP 1: Move Your Folders
First, plug in your drive, and go to the flash drive's folder. Then create a new folder. Lets name this folder "Lock." Now move all the files you wish to hide into "Lock." Make sure "Lock" is still on the flash drive.
STEP 2: Hide Your Folder
Now, open CMD (if you don't know what this is and want to learn check out my instructable on it) type in "g:" hit enter and type "attrib Lock +s +h" (if you have a folder name other than "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 specific folder path is typed in.
STEP 3: Actual Batch Coding
Open notepad and paste the following script:
____________________________________________________________________________________
@echo off
title Orange Shadow's Folder Lock set pass= [your password here!]
color a
echo----Enter Password----
set /p ui= if %ui%==%pass% (goto open)
echo Wrong Password! pause
exit :open start Lock
_____________________________________________________________________________________
There are two variables here:
Where it says in bold "[your password here!]" change it to what you want your password to be.
Then there is "Lock" go ahead and change the name to what your new folder's name is.
Save this script as a .bat file. To do this, go to save as, and after the name of the title, type ".bat" For example, "Password.bat"
Save this where ever you want, preferably on the flash drive itself.
STEP 4: Voila
Now, to access that hidden folder, open the bat file, enter the password, and the hidden file will open.
STEP 5: Turning Into an .exe
The thing about having a .bat file is that you can easily edit the script, making it accessible to anyone. Making this project is more of a novelty than actual "security."
However, There is a solution. Turning the .bat in a .exe (Windows 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.
20 Comments
LilGrimmTinkers 1 year ago
SeeBeeKay 1 year ago
'echo----Enter' is not recognized as an internal or external command,
operable program or batch file.
if == (goto open)
I tried to type my password after (goto open) and pressed enter, nothing happens. Can you help? I can't access to my important files that I transferred to "Lock" folder.
Thanks
justice786 8 years ago
i am stuck on step 2 please help
NotePro 2 years ago
SorooshS1 3 years ago
Thank you for the topic.
One question... I have hidden a folder. Now how could it be reverted?
Thanks
acehax310 2 years ago
SoniaJ24 5 years ago
nebbyscumbold 3 years ago
nebbyscumbold 3 years ago
"attrib [your folder name] -s -h"
Anyway, my advice (after trying this password trick for a while): DON'T DO IT!
He did state, and I quote: "I am not responsible for any lost and corrupted files. I highly suggest you back up your files before continuing."
One of my Maxtor drives is now corrupted: just the folder I added the password to, nothing else. If he knew it was risk free he wouldn't have added the preamble. Stupid, stupid me for trying this. I've just lost years of accumulated data, probably. Avoid people like this. Don't fall for it they way I did, you've been warned.
EbiC 5 years ago
The file is hidden and when I put the password it was not opening ......Again it show to put password again .....
I can't able to find my file
JacobG69 7 years ago
Hi, I was viewing this and made flether-1's version a little easier to use
@echo off
title Drive Locked
color 2
:0
echo================= & echo Enter Password & echo ================
set /p password=
if %password%==YOURPASSWORDHERE goto :1
echo Wrong Password
pause
goto :0
:1
echo Success!
pause
(START \YOURFOLDERNAMEHERE)
ChrisO136 6 years ago
Oh my god thank you so much for this updated version. I used the other one and couldn't open my file and spent several hours trying to fix it myself before looking through these. The original kept givving me error mesages.
iambeginner 7 years ago
i used this code. thanks bro.
BrianCho 6 years ago
i typed g: in cmd but its says
The system cannot find the drive specified.
Ma Ry 7 years ago
arfuxo155255 7 years ago
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: http://www.imoresoft.com/folder-lock.html
lizijish 8 years ago
File Folder performs better than the above tool because it has a much cleaner user interface instead of command line. You can check out: http://www.imoresoft.com/folder-lock.html
dfletcher-1 8 years ago
Fixed his code and made some adjustments if anyone is interested. Just change the bold "test" to whatever you want your password to be and change the E:\Files to the drive letter and folder name.
@echo offtitle Drive Locked
color b
echo================= & echo Enter Password & echo ================
set /p password=
if %password%==test (START E:\Files)
echo Wrong Password pause
exit :Files
PsycheE 8 years ago
i encounter error.. "Enter is not part of external or internal command" :'(
PsycheE 8 years ago
where do i need to save the notepad i created? do i need to have the program installed?