How to Block Access to a Folder Using a Batch File

Table of contents:

How to Block Access to a Folder Using a Batch File
How to Block Access to a Folder Using a Batch File
Anonim

Have you ever had the need to protect your data from prying eyes, without using the security features provided by Windows? If so, read this tutorial to learn how to do this by applying your own security policies.

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. Copy the source code, as shown in the figure

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

Step 3. Change your login password

Within the code, replace the string 'password here' with the chosen login password.

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

Step 4. Save the file by naming it 'locker.bat', then, in the 'Save as' field, select' All files (*

*)'.

When finished, hit the 'Save' button.

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

Step 5. Close the 'Notepad' window

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

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

A folder called 'Private' will be created.

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

Step 7. Move all the items you want to hide into the 'Private' folder and run the 'locker' file again

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

Step 8. Follow the on-screen instructions

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

Step 9. Finished

Nobody will be able to access the contents of the 'Private' folder without knowing the password.

Advice

  • The Windows 'Search' function is still able to find your folder.
  • If you do not want your folder to appear in a search performed using the Windows 'Explorer' window, configure it as 'Hidden'.
  • Keep your password carefully.
  • If you copy the code of the 'batch' file directly from this article, through the 'Edit' mode, be sure to remove the '#' character and any white space at the beginning of each line from the text.
  • Do not rename the folder after you have protected it, otherwise it will become accessible by anyone.

Warnings

  • An experienced user of 'batch' files will be able to trace your password. If you really want to protect your data, use encryption.
  • Programs like '7zip File Manager' will still be able to access your protected folder.

Recommended: