Lock a Folder Using a Batch File

Revision as of 19:22, 23 March 2017 by Kipkis (Kipkis | contribs) (importing article from wikihow)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Have you ever had the need for a protected folder, but didn't want to use Window's basic security? Then create your own!

Steps

  1. Open Notepad.
  2. Copy the code. Just like the image above.[1]
  3. Change the password. Where it says "type your password here", change it to your desired password.
  4. Save the file with name "locker.bat" and as all types and click "Save".
  5. Close the window.
  6. Run the "Locker" file by double-clicking it. You will get a folder named Locker.
  7. Move all the things you want to hide and again run locker.bat.
  8. Double click on the locker.bat again. A Command Prompt will open, it will ask you to lock the folder. Type Y then press enter.
  9. Done. No one can access your folder without the password.

Video

Tips

  • You need to store your password carefully.
  • If you copy and paste directly from wikiHow while in edit mode, make sure to remove the "#" and any spaces at the start of each line.
  • Set the hidden attribute on the file so it will not show up in a standard Windows Explorer search.
  • Do not rename the file after it is secured. It will no longer be protected.
  • Windows Search could find it.

Warnings

  • Someone who really understands batch files can figure out your password. If you really need to protect your data then you should encrypt it.Or you can use a 3rd-party program that turns batch files to executables ones so they can't edit the batch and know the password.
  • Programs like 7zip File Manager will be able to access the folder.

Sources and Citations

You may like