If the Mathematica kernel was invoked with a -script option or via a MathematicaScript mechanism, the $ScriptCommandLine contains the elements of the command line, starting with the name of the script.
If no -script option was provided, $ScriptCommandLine gives an empty list.