The input string is expected to be a copy of the command line that started the program as the result of calling OS_GetEnv. Each parameter is separated by spaces, and so to include spaces in a parameter it must be enclosed in quotes.
For example: COPY "source file" destination
A parameter may also consist of a keyword followed by a value, again separated by spaces. A keyword that is a switch will not be followed by a value as the value is the presence or absence of the switch. Keywords are preceded by “-”. For example: COPY -input "source file" -output destination -overwrite
In this example both -input and -output are keywords followed by a value, whereas -overwrite is a switch.
Because keywords are identified by the preceding “-” character you can not have a value starting with a “-” character, for example: -3+6
. To work around this enclose the value with brackets: (-3+6)
. You can also use quotes instead of brackets.
Keywords may also be referred to by their alias, or the first letter of either the keyword or the alias. For example, if the syntax string contains "name=title"
then all of the following input strings will match:
"-name fred", "-n fred", "-title fred", "-t fred"
If more than one keyword has the same first letter, then only the first keyword in the syntax string will be matched.
Keywords are case insensitive, so "-FILE"
and "-file"
are identical.
Keywords may be optional and if they are not specified in the input string then the first unused keyword that is not a switch will be given that value.