[HOME PAGE] [STORES] [CLASSICISTRANIERI.COM] [FOTO] [YOUTUBE CHANNEL]

Batch - Viquipèdia

Batch

De Viquipèdia

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.

[edita] 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

[edita] Enllaços externs