Coming from CMD.EXE

This table was last updated for Nu 0.67.0.

CMD.EXENuTask
ASSOCDisplays or modifies file extension associations
BREAKTrigger debugger breakpoint
CALL <filename.bat><filename.bat>Run a batch program
nu <filename>Run a nu script in a fresh context
source <filename>Run a nu script in this context
use <filename>Run a nu script as a module
CD or CHDIR$env.PWDGet the present working directory
CD <directory>cd <directory>Change the current directory
CD /D <drive:directory>cd <drive:directory>Change the current directory
CLSclearClear the screen
COLORSet the console default foreground/background colors
ansi {flags} (code)Output ANSI codes to change color
COPY <source> <destination>cp <source> <destination>Copy files
COPY <file1>+<file2> <destination>[<file1>, <file2>] | each { open --raw } | str collect | save --raw <destination>Append multiple files into one
DATE /Tdate nowGet the current date
DATESet the date
DEL <file> or ERASE <file>rm <file>Delete files
DIRlsList files in the current directory
ECHO <message>print <message>Print the given values to stdout
ECHO ONEcho executed commands to stdout
ENDLOCALexport envChange env in the caller
EXITexitClose the prompt or script
FOR %<var> IN (<set>) DO <command>for $<var> in <set> { <command> }Run a command for each item in a set
FTYPEDisplays or modifies file types used in file extension associations
GOTOJump to a label
IF ERRORLEVEL <number> <command>if $env.LAST_EXIT_CODE >= <number> { <command> }Run a command if the last command returned an error code >= specified
IF <string> EQU <string> <command>if <string> == <string> { <command> }Run a command if strings match
IF EXIST <filename> <command>Run a command if the file exists
IF DEFINED <variable> <command>Run a command if the variable is defined
MD or MKDIRmkdirCreate directories
MKLINKCreate symbolic links
MOVEmvMove files
PATH$env.PathDisplay the current path variable
PATH <path>;%PATH%let-env Path = ($env.Path | prepend <path>)Edit the path variable
PATH %PATH%;<path>let-env Path = ($env.Path | prepend <path>)Edit the path variable
PAUSEinput "Press any key to continue . . ."Pause script execution
PROMPT <template>let-env PROMPT_COMMAND = { <command> }Change the terminal prompt
PUSHD <path>/POPDenter <path>/exitChange working directory temporarily
REM#Comments
REN or RENAMEmvRename files
RD or RMDIRrmRemove directory
SET <var>=<string>let-env <var> = <string>Set environment variables
SETLOCAL(default behavior)Localize environment changes to a script
START <path>explorer <path>Open a file as if double-clicked in File Explorer
TIME /Tdate now | date format "%H:%M:%S"Get the current time
TIMESet the current time
TITLESet the cmd.exe window name
TYPEopen --rawDisplay the contents of a text file
openOpen a file as structured data
VERDisplay the OS version
VERIFYVerify that file writes happen
VOLShow drive information

Before Nu version 0.67, Nu used toopen in new window use CMD.EXE to launch external commands, which meant that the above builtins could be run as an ^external command. As of version 0.67, however, Nu no longer uses CMD.EXE to launch externals, meaning the above builtins cannot be run from within Nu, except for ASSOC, DIR, ECHO, FTYPE, MKLINK, START, VER, and VOL, which are explicitly allowed to be interpreted by CMD if no executable by that name exists.