$ScriptCommandLine
✖
$ScriptCommandLine
is a list of strings giving the elements of the command line with which the standalone Wolfram System script was invoked.
Details

- If the Wolfram Language kernel was invoked via a wolframscript mechanism, the $ScriptCommandLine contains the elements of the command line, starting with the name of the script.
- If the Wolfram Language kernel was run in a way other than via a wolframscript mechanism, the $ScriptCommandLine gives an empty list.
Examples
Basic Examples (1)Summary of the most common use cases
$ScriptCommandLine is empty in an interactive session:

https://wolfram.com/xid/0e5gwxjf0mkmm8-pd75kp

Find the wolframscript executable:

https://wolfram.com/xid/0e5gwxjf0mkmm8-n0jlvd
Set up appropriate arguments for the operating system:

https://wolfram.com/xid/0e5gwxjf0mkmm8-4bf3sd
$ScriptCommandLine will include the executable and its arguments when launched:

https://wolfram.com/xid/0e5gwxjf0mkmm8-8on1wc

Wolfram Research (2010), $ScriptCommandLine, Wolfram Language function, https://reference.wolfram.com/language/ref/$ScriptCommandLine.html.
Text
Wolfram Research (2010), $ScriptCommandLine, Wolfram Language function, https://reference.wolfram.com/language/ref/$ScriptCommandLine.html.
Wolfram Research (2010), $ScriptCommandLine, Wolfram Language function, https://reference.wolfram.com/language/ref/$ScriptCommandLine.html.
CMS
Wolfram Language. 2010. "$ScriptCommandLine." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$ScriptCommandLine.html.
Wolfram Language. 2010. "$ScriptCommandLine." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$ScriptCommandLine.html.
APA
Wolfram Language. (2010). $ScriptCommandLine. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$ScriptCommandLine.html
Wolfram Language. (2010). $ScriptCommandLine. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$ScriptCommandLine.html
BibTeX
@misc{reference.wolfram_2025_$scriptcommandline, author="Wolfram Research", title="{$ScriptCommandLine}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/$ScriptCommandLine.html}", note=[Accessed: 08-July-2025
]}
BibLaTeX
@online{reference.wolfram_2025_$scriptcommandline, organization={Wolfram Research}, title={$ScriptCommandLine}, year={2010}, url={https://reference.wolfram.com/language/ref/$ScriptCommandLine.html}, note=[Accessed: 08-July-2025
]}