How to protect a folder with a batch file: 9 steps

Table of contents:

How to protect a folder with a batch file: 9 steps
How to protect a folder with a batch file: 9 steps
Anonim

This article will show you how to protect a folder using a batch file (BAT file).

Steps

Lock a Folder Using a Batch File Step 1
Lock a Folder Using a Batch File Step 1

Step 1. Open Notepad

Lock a Folder Using a Batch File Step 2
Lock a Folder Using a Batch File Step 2

Step 2. Enter the code shown in the picture into Notepad

Lock a Folder Using a Batch File Step 3
Lock a Folder Using a Batch File Step 3

Step 3. Change your password

Replace "type your password here" with your password.

Lock a Folder Using a Batch File Step 4
Lock a Folder Using a Batch File Step 4

Step 4. Save the text file

Click "File" - "Save As", from the "Save as type" menu, select "All Files", and in the "File name" line enter locker.bat

Lock a Folder Using a Batch File Step 5
Lock a Folder Using a Batch File Step 5

Step 5. Close Notepad

Lock a Folder Using a Batch File Step 6
Lock a Folder Using a Batch File Step 6

Step 6. Run the locker.bat file by double clicking on it

The Locker folder will be created.

Lock a Folder Using a Batch File Step 7
Lock a Folder Using a Batch File Step 7

Step 7. Move the files that you want to protect into it

Lock a Folder Using a Batch File Step 8
Lock a Folder Using a Batch File Step 8

Step 8. Run the locker.bat file again (by double clicking on it)

A command prompt will open asking you to block (protect) the folder. Type Y and press Enter.

Lock a Folder Using a Batch File Step 9
Lock a Folder Using a Batch File Step 9

Step 9. Done

Now the folder cannot be accessed without a password.

Advice

  • Do not change the names of files in the protected folder. Otherwise, they will not be protected.
  • Store your password in a safe place.
  • If you copy the batch file code directly from the WikiHow page (in edit mode), remove the "#" and spaces at the beginning of each line.
  • Windows search engine can find the protected folder.
  • Hide the files so they do not appear in Windows Explorer.

Warnings

  • An experienced user who understands batch files can find out the password. If you want to reliably protect your data, then encrypt it.
  • Programs like 7zip can access the folder.

Popular by topic