Windows Batch Script

From Encyc

Windows Batch Script is a programming language specific to Windows platform computers. It is sometimes referred to as "Batchfile", and sometimes "MS-DOS" or simply "DOS", for it is the modern day equivalent of a MS-DOS command line. The commands are almost the same, with newer commands thrown in with the advent of the Internet. This language is usually written either in a simple text editor like Notepad (with a .bat file extension), or typed and executed immediately in a Windows Command Prompt, which can be found under "accessories" which can be found under "programs" on the Start menu of Windows.

Examples[edit]

Here is a programming example using the Windows Batch Script/MS-DOS language. Type this into Notepad:

ver echo "Hello, Encyc!" exit When saved in Notepad as encyc.bat (filetype All Files), you can then go to your Command Prompt and type "encyc.bat" in. It will look for your new MS-DOS program. When it finds it, it will do the following: Ver: displays the version number of Windows you are using. echo "Hello, Encyc!" Pops up a box that reads "Hello, Encyc!" exit closes the command prompt or whatever DOS interpreter you are using.