Skip to content

CommandToList

Convert a command-line to a list of command options.

Declaration

Source position: processbody.inc line 252

procedure CommandToList(S: TProcessString; List: TProcessStrings);

Arguments

Name Description
S String to split up.
List List of command-line arguments, one per item.

Description

CommandToList splits the string S in command-line arguments that are returned, one per item, in the List stringlist. Command-line arguments are separated by whitespace (space, tab, CR and LF characters). If an argument needs to contain a space character, it can be surrounded in quote characters (single or double quotes).

Errors

There is currently no way to specify a quote character inside a quoted argument.

See also

Name Description
TProcess.CommandLine Command-line to execute (deprecated).