Batch

Article on other languages:

del.icio.us del.icio.us
Digg Digg
Furl Furl
Reddit Reddit
Rojo Rojo
Add to OnlyWire

Un arxiu batch (o bat) és un arxiu de processament per lots: es tracta d'arxius de text sense format, desats normalment amb l'extensió *.bat (també com a *.cmd o *.btm) que contenen un conjunt de comandes DOS. Quan s'executa aquest arxiu bat, les comandes contingudes són executades en grup, de forma seqüencial, permetent automatitzar diverses feines.

Qualsevol comanda DOS pot ser utilitzada en un arxiu batch.

Exemple

Un exemple d'un fitxer batch simple:

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

Enllaços externs

This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.


Giant Panda

Mercedes Car
James Bond Guide
This site monitored by SitePinger.net