SYS namespace

Symbols grouped by the SYS namespace.

Symbols in this namespace: 7

SymbolKindCategoryDescription
SYS.ARGFunctionSystem functionsReturns one zero-based positional command-line argument, or an empty string when out of range.
SYS.ARGCFunctionSystem functionsReturns the number of positional arguments passed after the script name on the command line.
SYS.CWDFunctionSystem functionsReturns the current process working directory.
SYS.GETFunctionSystem functionsReturns a named parameter passed with --set name=value; optional second argument is the default value.
SYS.HASFunctionSystem functionsTRUE if a named parameter was passed with --set name=value.
SYS.SCRIPT_DIRFunctionSystem functionsAbsolute directory containing the currently loaded .cvb script.
SYS.SCRIPT_PATHFunctionSystem functionsAbsolute path of the currently loaded .cvb script.

SYS.ARG

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.ARG(index)

Returns one zero-based positional command-line argument, or an empty string when out of range.

Minimal example

value = SYS.ARG(index)

SYS.ARGC

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.ARGC()

Returns the number of positional arguments passed after the script name on the command line.

Minimal example

value = SYS.ARGC()

SYS.CWD

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.CWD()

Returns the current process working directory.

Minimal example

value = SYS.CWD()

SYS.GET

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.GET(name[, defaultValue])

Returns a named parameter passed with --set name=value; optional second argument is the default value.

Optional parameters

Parameters enclosed in [...] may be omitted. Nested brackets mean that the later parameter is available only when the previous optional level is also supplied.

ParameterMeaning
defaultValueOptional parameter. If omitted, the command uses its internal default.

Minimal example

value = SYS.GET(name[, defaultValue])

SYS.HAS

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.HAS(name)

TRUE if a named parameter was passed with --set name=value.

Minimal example

value = SYS.HAS(name)

SYS.SCRIPT_DIR

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.SCRIPT_DIR()

Absolute directory containing the currently loaded .cvb script.

Minimal example

value = SYS.SCRIPT_DIR()

SYS.SCRIPT_PATH

FUNCTIONSYSBATCH-FRIENDLY
Kind: Function   Category: System functions   Namespace: SYS

SYS.SCRIPT_PATH()

Absolute path of the currently loaded .cvb script.

Minimal example

value = SYS.SCRIPT_PATH()