Citizendia
Your Ad Here

Batch file
File name extension . A filename extension is a suffix to the name of a Computer file applied to indicate the encoding convention ( File format) of its contents bat . cmd . btm
Type of format Scripting
Container for Shell scripts

In DOS, OS/2, and Microsoft Windows, a batch file is a text file containing a series of commands intended to be executed by the command interpreter. "Scripting" redirects here For other uses see Script. A shell script is a script written for the shell, or Command line interpreter, of an Operating system. DOS, short for "Disk Operating System" is a shorthand term for several closely related Operating systems that dominated the IBM PC compatible market OS/2 is a computer Operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively Microsoft Windows is a series of Software Operating systems and Graphical user interfaces produced by Microsoft. A text file (sometimes spelled "textfile" is a kind of Computer file that is structured as a sequence of lines. In Computing, a command is a directive to a computer program acting as an interpreter of some kind in order to perform a specific task When a batch file is run, the shell program (usually COMMAND.COM or cmd.exe) reads the file and executes its commands, normally line-by-line. In computing a shell is a piece of software that provides an interface for users COMMANDCOM is the filename of the default Operating system shell for DOS Operating systems and the default Command line interpreter cmdexe is the Command line interpreter on OS/2, Windows CE and on Windows NT -based operating systems (including Windows Batch files are useful for running a sequence of executables automatically and are often used by system administrators to automate tedious processes. In Computing, an executable (file causes a computer "to perform indicated tasks according to encoded instructions," as opposed to a file that only contains A system administrator, systems administrator, or sysadmin, is a person employed to maintain and operate a Computer system and/or network.

Although a batch file is analogous to a shell script in Unix-like operating systems, the limited syntax and commands available makes it is less suited for general-purpose programming. A shell script is a script written for the shell, or Command line interpreter, of an Operating system. A Unix-like (sometimes shortened to *nix) Operating system is one that behaves in a manner similar to a Unix system while not necessarily conforming An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination These limitations lead to the widespread use of "enhancement" commands such as those in the Norton Utilities and later the replacement shell 4DOS in the DOS era. The Norton Utilities releases were collections of Software utilities 4DOS is a Command line interpreter by JP Software designed to replace the default command interpreter COMMAND

DOS batch files have the filename extension . A filename extension is a suffix to the name of a Computer file applied to indicate the encoding convention ( File format) of its contents bat. Batch files for other environments may have different extensions, e. g. . cmd in Windows NT and OS/2, or . Windows NT is a family of Operating systems produced by Microsoft, the first version of which was released in July 1993 btm in 4DOS and related shells. There is no difference between the . bat and . cmd extensions when the file is directly executed. However, when a shortcut is used to launch them, . bat files run commands using the 16-bit COMMAND.COM command processor whereas if the extension is . COMMANDCOM is the filename of the default Operating system shell for DOS Operating systems and the default Command line interpreter cmd, the batch commands are run using the 32-bit Windows NT cmd.exe with all command extensions enabled. The range of Integer values that can be stored in 32 bits is 0 through 4294967295 or −2147483648 through 2147483647 using Two's complement encoding cmdexe is the Command line interpreter on OS/2, Windows CE and on Windows NT -based operating systems (including Windows Also, the Windows 9x family only recognizes the . Windows 9x is the family of Microsoft Windows Operating systems that comprises the hybrid 16/32-bit Windows versions Windows 95, Windows 98 bat extension.

Contents

History

Microsoft DOS and Windows batch programming has evolved along with the product releases of these operating systems. Microsoft Corporation is an American multinational Computer technology Corporation, which rose to dominate the Home computer The command interpreters that come with these operating systems provide two distinct modes of work: interactive mode (in which the user types commands at a command prompt which are then executed immediately) and batch mode (which executes a predefined sequence of commands). In Computer science, an interpreter normally means a Computer program that executes, i Batch processing is execution of a series of programs (" jobs quot on a Computer without human interaction The original concepts for both modes draw ideas from Unix shells, as well as other text-based command line interfaces from the early 1980s such as CP/M which in turn took much of their inspiration from TOPS-10 and TOPS-20 from Digital Equipment Corporation. A Unix shell, is a command line shell that provides the traditional User interface for the Unix Operating system and for Unix-like CP/M (Control Program for Microcomputers is an Operating system originally created for Intel 8080 / 85 based Microcomputers by Gary Kildall The TOPS-10 System was a computer Operating system from Digital Equipment Corporation (DEC for the PDP-10 released in 1964, the resulting systems The TOPS-20 Operating system by Digital Equipment Corporation (DEC was the second proprietary OS for the PDP-10. Digital Equipment Corporation was a pioneering American company in the Computer industry

The MS-DOS operating system's batch program interpreter is COMMAND. MS-DOS (short for M icro' s' oft D isk O perating S ystem is an Operating system commercialized by Microsoft. COM. Batch programs for MS-DOS are composed of a relatively simple set of commands interpreted directly by COMMAND. COM (internal commands), and utilities that exist as separate executables (external commands). The evolution of this branch of batch programming proceeded through the releases of MS-DOS, and into Windows 95, Windows 98, and finally Windows Me. Windows 95 is a consumer-oriented Graphical user interface -based Operating system. Windows 98 ( codenamed Memphis) is a graphical Operating system released on 25 June 1998 by Microsoft and the successor to Windows 95 Windows Millennium Edition, or Windows Me (IPA pronunciation, iː is a hybrid 16-bit / 32-bit graphical Operating system released on 14 September In MS-DOS, the most commonly used batch file was AUTOEXEC.BAT, a special batch file that (if it is present) is automatically executed during the booting process. AUTOEXECBAT is the name of a system file found originally on the MS-DOS operating system In Computing, booting ( booting up) is a bootstrapping process that starts Operating systems when the user turns on a Computer system

The newest versions of Windows, Windows 2000 and Windows XP, and Windows Vista are not based on MS-DOS, but on Windows NT. Windows 2000 (also referred to as Win2K) is a preemptive, interruptible graphical and business-oriented Operating system designed to work with Windows XP is a family of 32-bit and 64-bit Operating systems produced by Microsoft for use on Personal computers including home and Windows Vista (ˈvɪstə is a line of Operating systems developed by Microsoft for use on Personal computers including home and business desktops Windows NT is a family of Operating systems produced by Microsoft, the first version of which was released in July 1993 NT-based systems include the cmd. exe command line interpreter, which is generally compatible with COMMAND. COM, although a few MS-DOS features are not available. However, cmd. exe provides many additional features and commands not included with MS-DOS or the MS-DOS-based versions of Windows. COMMAND. COM is still present under NT-based operating systems for better backward compatibility.

The limitations of the original batch file language led to various non-Microsoft interpreters to provide enhanced syntax; the most well-known of those are 4DOS and 4NT. 4DOS is a Command line interpreter by JP Software designed to replace the default command interpreter COMMAND 4NT is a Command line interpreter by JP Software designed as asubstitute for the default command interpreter in Microsoft Windows

Although the IBM OS/2 operating system did support DOS-style batch files, it contained a version of REXX — a more advanced scripting language. International Business Machines Corporation abbreviated IBM and nicknamed "Big Blue", is a multinational Computer Technology REXX (REstructured eXtended eXecutor is an interpreted Programming language which was developed at IBM. "Scripting" redirects here For other uses see Script.

For complex tasks using Microsoft Windows version 98 and up, you may use Windows Script Host, which allows the running of scripts written in VBScript, JScript and related scripting languages. The Microsoft Windows Script Host (originally called Windows Scripting Host, but renamed for the second release is distributed and installed by default on Windows VBScript (short for Visual Basic Scripting Edition) is an Active Scripting language developed by Microsoft. JScript is the Microsoft dialect of the ECMAScript Scripting language specification As of 2006, Microsoft created another scripting tool called Windows PowerShell, which can be used with Windows XP and above. Windows PowerShell is an extensible command-line shell and associated Scripting language from Microsoft

Example

An example of a simple batch file:

REM ECHO OFF prevents the printing of each command to standard output. 
@ECHO OFF
REM ECHO.  prints a blank line. 
ECHO. 
ECHO Hello World, press any key to start APROGRAM. EXE!
PAUSE > NUL
REM The first argument to the batch file can be referenced with "%1"
APROGRAM. EXE %1
IF ERRORLEVEL 1 GOTO error
ECHO. 
ECHO APROGRAM has finished whatever it was doing. 
GOTO end
:error
ECHO. 
ECHO Something went wrong with AProgram. 
:end


See also

External links

VBScript (short for Visual Basic Scripting Edition) is an Active Scripting language developed by Microsoft. Windows PowerShell is an extensible command-line shell and associated Scripting language from Microsoft
© 2009 citizendia.org; parts available under the terms of GNU Free Documentation License, from http://en.wikipedia.org
Dapyx Software network: MP3 Explorer | Ebook Manager | Zenithic