The batch programming (Batch Programming in English) is a programming model that can execute certain commands automatically at the level of an operating system such as DOS or Windows. If retrieved with the command line, the system will execute each listed task in turn. In this way, the term batch scheduling it is quite common. Batch files are usually used to control and configure operating systems, but they can also be used for other operations such as server installations. The most famous is probably the Autoexec.bat file that starts the DOS operating system.
History
In the early days of information technology, programs and records were stored on punch cards that were later added to the PC. This batch was the sequence in which the system had to work. Both data and commands can be entered into the system in this way. With the advent of other storage media such as magnetic cards and tapes in the 1960s, punch cards were supplanted, and taking a back seat, but the term batch processing still applied to the principle of successive sequential processing.
Functionality
The batch scheduling can be categorized as an interpreter-based programming language. It includes fundamental functions of a programming language, such as IF, IF NOT, or WHILE. But you cannot program apps with it. Since programs with numerous commands are not saved after compilation as an executable file, as is common in apps, batch files are based on a time-oriented translation into machine language. This is done using the Windows command line cmd.exe (under DOS command.com). The batch file, which can be edited with a standard text editor, obtains and analyzes what exists there and translates it into binary code.[1]
The command line can only execute the file if it is formulated in the correct batch syntax, in other words, the available characters, commands and their links must be within the corresponding system batch grammar. To illustrate: some MS-DOS batch commands may not be available under certain circumstances in Windows NT or Windows 7.[2].
Often used, the basic batch commands are:
threw out
- Displays text on the screen
@echo off
- Avoid text output
rem
- Define a comment line
start
- Run a file in its default application
mkdir
- Create a folder
rmdir
- Delete a folder
of
- Delete one or more files
copy
- Copy one or more files
xcopy
- Copy a file with additional options
for in do
- For a variable X (para) a value is assigned (en), and subsequently an action (do) is started. So, for example, you can delete all files with a certain file length in the current directory.
call
- Get a batch file inside the current one
if
Under a certain condition an action is performed. "If the condition does not apply, enter" Other "as an option.
When recording commands, spaces can cause the program to hang. If spaces appear in file names, they must be enclosed in quotation marks. Batch files cannot read special characters like ä, ö, or ü either. They are restricted to the ASCII character set that does not include umlauts. Caution is advised for many commands because certain files are essential to the operation of the system. Batch schedulers must know precisely what they are doing so as not to compromise system stability.
Example
A simple example of the text output of "Hello World! It is written with a text editor, it is recorded and called with the command line and it is executed. In the command line appears the text «Hello World! The lines marked with REM (comments) explain the preceding batch commands and will not be executed.
echo hello world! REM text "Hello World!" output. pause REM Only the program will be closed when the button is pressed.
In principle, batch scheduling can be used for individual tasks in the field of online marketing. IP addresses and images can be batch processed. Batch jobs are always suitable for tasks that require several steps of the same type to be executed in sequence. For example, batch programming is sometimes used to read log files, extract data for web analysis, save it, and print it. However, other programs are preferred because the amount of programming required would be very high.
Web Links