# EXIT
> [HTML Version](exit_lit.htm)
_Updated June 2021_
**EXIT**
(Used only from within CMD/DO files.) EXIT terminates a CMD or DO file, and is only needed when you would like to terminate it somewhere other than the physical end of the file, usually in conjunction with a conditional statement involving IF.
**Example**
if "\$0" = "" then
:
exit
endif
versys \$0
dir/f \$0