How to secure your folders through Batch files

Are you looking for a way to secure the files on your computer? Are you looking for a way to secure your files without any software? A batch file described in this article will help you to secure your files.

Why it is important to secure your files?

Most of the present day business and work is computerized. Our computers have become the storage place for most of our official files. We are also used to storing our personal information, photos and even critical items like passwords and scanned documents in our computers. It is important for us to protect such information from others. Children who use these computers to play games on end up deleting important files in our computer.

Securing our files becomes an important task most of the people. There are many ways to protect your files. Some people create a separate login to store critical documents. Some others install folder lock software to secure their files. In both cases, passwords are easily exploitable and can be cracked. Sometimes we forget the passwords and end up losing important information. There is a simple batch program which will help you to safeguard your files without any troubles.

What is a batch program?

Batch programs are series of instructions which can be executed through a command editor. It is considered as one of the oldest ways of programming languages. Each set of commands sends out different instruction to the computer. A batch program can be easily written in a text document using notepad. It is important to store the batch program file with extension as ".bat" to make it as an executable file. The user just needs to double click the batch file to execute the commands written in the file. Usually the commands will execute line by line as written in the file. The execution flow may change if it encounters any conditioning statement like "If, for or GOTO" commands.

Batch program to protect your files

There are 2 batch programs mentioned here to apply access restriction based on the user needs.

File: Access.bat
icacls "Path" /grant Everyone:M

File: Deny.bat
icacls "Path" /deny Everyone:M

Give the path of the folder which you want to protect within the double quotes. The first file "Access.bat" will give access to the specified folder for all the users of the computer. The second file "Deny.bat" will restrict access to the specified folder for all the users of the computer.

Step to run the batch files:

  1. Place the batch files "Access.bat" and "Deny.bat" in a folder which is different from the folder you want to protect or a folder which is less accessible by other users of the computer. I will recommend you to place the files in the system share path which is less accessed by others.
  2. Run the file "Access.bat" whenever you want to access the files placed in the secured folder.
  3. Run the file "Deny.bat" after using the files placed in the secured folder.
  4. Follow the steps whenever you want to restrict others to use the files placed in the secured folder.

Advantages of using batch files:

  1. No need to install additional software to protect the files.
  2. Run on any machine which supports command prompt.
  3. No need to have a high end configuration.
  4. Take less memory to save the files.
  5. The user has full control our access restrictions.


No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: