How Do You Make a Batch File?

How Do You Make a Batch File?

To make a batch file in Windows 7, you need to use a text processor utility, such as Notepad, to input batch commands, and save the file. Once the file is saved, you need to enable the setting that makes the file extensions visible to change the format into BAT.

  1. Start the Notepad utility

    Click on Start, and select the All Programs option. Click on the Accessories folder, and select Notepad from the list.

  2. Input the batch commands

    To create a simple batch file, type “@echo off” as the first line in the Notepad window and press Enter. Type in “echo,” input the text you wish to display upon running the batch file, and press Enter. Type in “pause” as the third line. Click on File, and select the Save As option. Input the name of the file, and click Save.

  3. Enable file-extension visibility

    Click on Start, and select the Control Panel option. Click on Appearance and Personalization, and click on the Folder Option link. Click on the View tab, uncheck the box next to the option labeled with Hide extensions for known file types, and click OK.

  4. Change the TXT format into BAT

    Locate the text file you saved earlier, right-click on it, and select the Rename option from the drop-down menu. Delete the “txt” part of the file name, type in “bat” in its place, and press Enter. This should change the appearance of the icon, which signifies that the file is now a simple batch file that displays a message once you double-click on it.