hp workstations zx6000, hp server rx2600 - operation and maintenance guide
System Configuration
Extensible Firmware Interface (EFI)
Chapter 3
113
arguments The command in many cases has an argument or set of arguments
that enhance the capabilities of the command.
Notes:
• This control construct is only available in batch script files.
• If the condition is true, the commands are executed and the control construct is
exited. Otherwise, if there is an else contract, the commands within this construct
are executed and the if...then/endif control structure is exited.
Examples:
• To test whether a file exists before you execute it, you would create a control
structure similar to this:
if exist fs0:\myscript.nsh then
myscript.nsh myarg1 myarg2
else
echo The file does not exist.
endif
• To test whether two string values are equal before executing a set of commands, you
would create a control structure similar to this:
if %str1% == %str2% then
myscript1.nsh
myscript2.nsh
else
echo The two stings are not equal.
endif
for/forend Control Structure The for/forend control structure executes one or
more commands for each item in a set of items. While the condition is true for this
control structure the for loop will continue to loop.
Syntax
for %indexvar in set
command [arguments]
[command [arguments]]
endfor
%indexvar This is the index value for the for loop.
set A set can be a file or batch of files (for example, myfile.txt or
*.nsh).
command This command is one of the EFI commands that may or may not be
executed in this control construct.
arguments The command in many cases has an argument or set of arguments
that enhance the capabilities of the command.