Automation on PC---Batch files

Virtualab Protocols (Chang Bioscience)
MS-DOS batch files is a text file that contains one or more commands and has a .bat or .cmd file extension. Under MS-DOS at the command prompt you can run the commands sequentially as they appear in the file by type the file name. Double-click on the file icon will also run the commands under Windows. One can also schedule a batch file to run at specific times using Scheduled task.

1. To edit a new .bat file, start Notepad.

2. Type in the following command:

start notepad

Or use any commands you would like to run.

3. Save as "mybatch.bat".

4. The mybatch.bat icon shouldn't look like the icon for a text file. If it looks like a text file, make sure that the "save as" file type is "All files (*.*)" when saving.

5. Double-click on the mybatch.bat icon to run the batch file. A notepad window should appear.

To schedule a batch file to run at specific times, see Scheduled task.