ParamStr Function
The ParamStr
function returns the
Number
th command-line parameter.
ParamStr
is a real function.
Parameter number zero is the application pathname.
Parameters are numbered from 1 to ParamCount
. If
Number
is invalid, ParamStr
returns an empty string.
When breaking a command line into parameters, Delphi uses white space characters as separators. Use double quotes around text that contains space characters to include the spaces as part of the parameter (e.g., long filenames).
To look for command-line switches, call the
FindCmdLineSwitch
function from the
SysUtils
unit.