Batch: diferència entre les revisions
Contingut suprimit Contingut afegit
Cap resum de modificació |
Cap resum de modificació |
||
Línia 2:
Qualsevol comanda DOS pot ser utilitzada en un [[Fitxer informàtic|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
[[Categoria:Llenguatges script]]
|