Batch (.bat) File in Windows

Batch files in windows are a way to automate multiple tasks in Windows. Windows 7, Windows 8, Windows Vista, Windows XP and other versions of Microsoft supports it. The Batch files are simple text files with extension .bat. A simple .bat file can contain multiple applications to open like example given below

File Name Sample.bat

Contents

Notepad

Calc

The above batch file can be executed by double clicking on it. On execution the above batch file will open Notepad and will wait for it to close. Once Notepad is closed calculator will be launched.

In case you would like the batch file not to wait for applications to close, you can write like

start Notepad

start Calc

In above example the batch file will not wait and will open Notepad and then Calculator.