_? contains the exit code of the last internal command. You must use or save this value immediately, because it is set by every internal command, including the one used to save it.
|command was successful
|a usage error occurred
|another TCC error or an operating system error occurred
|the command was interrupted by Ctrl-C or Ctrl-Break
This variable can also be set in a subroutine by the RETURN command.
Note that in imitation of CMD some internal commands, e.g., DIR, also set the variables ? and ERRORLEVEL to the same value they set this variable. However, you are strongly urged to use this variable.
See also: ?