The DOSBox-X DOS shell provides a comprehensive set of built-in commands that are executed directly by the shell interpreter without requiring any external executable on disk. These commands are always available regardless of which drives are mounted, making them the foundation for navigating the file system, writing batch scripts, and managing the emulated DOS environment. Commands are registered inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/joncampbell123/dosbox-x/llms.txt
Use this file to discover all available pages before exploring further.
shell_cmds.cpp and many have both a short alias and a full name (for example, CD and CHDIR are identical).
CHOICE, COUNTRY, DELTREE, ADDKEY, LS, and INT2FDBG) are actually programs on the Z: drive and are documented in DOS Programs.Navigation
CD / CHDIR — Change directory
CD / CHDIR — Change directory
CD /D <drive:path> to switch drives and directories simultaneously.DIR — List directory contents
DIR — List directory contents
| Switch | Effect |
|---|---|
/W | Wide list format (multiple columns) |
/P | Pause after each screenful |
/A | Show files with specified attributes (H hidden, S system, D dirs, R read-only) |
/O | Sort order: N name, S size, E extension, D date, - reverse |
/S | Include subdirectories recursively |
/B | Bare format (filenames only) |
/L | Lowercase output |
LS — Unix-style directory listing (Z:\BIN\LS.COM)
LS — Unix-style directory listing (Z:\BIN\LS.COM)
DIR. LS is not a shell built-in — it runs as Z:\BIN\LS.COM, which is available because Z:\BIN\ is in the default DOS path.MD / MKDIR — Make directory
MD / MKDIR — Make directory
RD / RMDIR — Remove directory
RD / RMDIR — Remove directory
DELTREE to remove a directory and all its contents.PUSHD — Push directory and change
PUSHD — Push directory and change
POPD to return to the saved directory.POPD — Pop directory from stack
POPD — Pop directory from stack
PUSHD call.TRUENAME — Show canonical path
TRUENAME — Show canonical path
File Operations
COPY — Copy files
COPY — Copy files
| Switch | Effect |
|---|---|
/V | Verify copy after writing |
/Y | Suppress overwrite prompt |
/-Y | Require overwrite confirmation |
/A | Treat files as ASCII text |
/B | Treat files as binary |
DEL / ERASE — Delete files
DEL / ERASE — Delete files
DELTREE — Delete directory tree (Z:\DOS\DELTREE.EXE)
DELTREE — Delete directory tree (Z:\DOS\DELTREE.EXE)
DELTREE is not a shell built-in — it runs as the program Z:\DOS\DELTREE.EXE.REN / RENAME — Rename file
REN / RENAME — Rename file
TYPE — Display file contents
TYPE — Display file contents
MORE — Page file contents
MORE — Page file contents
ATTRIB — File attributes
ATTRIB — File attributes
+ to set or - to clear.| Attribute | Meaning |
|---|---|
R | Read-only |
H | Hidden |
S | System |
A | Archive |
Batch & Scripting
CALL — Call a batch file
CALL — Call a batch file
CALL, executing another .bat from within a batch file does not return.ECHO — Display text or toggle echo
ECHO — Display text or toggle echo
ECHO. (with a dot and no space) prints a blank line.FOR — Loop command
FOR — Loop command
FOR loops is controlled by LFNFOR.%%F (double percent) instead of %F.GOTO — Jump to label
GOTO — Jump to label
IF — Conditional execution
IF — Conditional execution
PAUSE — Wait for keypress
PAUSE — Wait for keypress
Press any key to continue... until the user presses a key.REM — Comment
REM — Comment
SHIFT — Shift batch parameters
SHIFT — Shift batch parameters
%0, %1, …) left by one position, discarding %0 and promoting %1 to %0.CHOICE — Prompt for user choice (Z:\DOS\CHOICE.COM)
CHOICE — Prompt for user choice (Z:\DOS\CHOICE.COM)
ERRORLEVEL to the position of the chosen key. CHOICE is not a shell built-in — it runs as the program Z:\DOS\CHOICE.COM.| Switch | Effect |
|---|---|
/C:<keys> | Set of valid keys (default YN) |
/N | Do not show choices in prompt |
/S | Case-sensitive matching |
/T:<key>,<secs> | Default key after timeout |
Environment
SET — Environment variables
SET — Environment variables
SET /P <var>=<prompt> is not available in the DOSBox-X shell; use CHOICE for interactive input.PATH — Executable search path
PATH — Executable search path
PATH ; clears the path to an empty string.PROMPT — Command prompt string
PROMPT — Command prompt string
| Token | Expands to |
|---|---|
$P | Current drive and path |
$G | > character |
$D | Current date |
$T | Current time |
$N | Current drive letter |
$$ | Literal $ |
$_ | Newline |
ALIAS — Command aliases
ALIAS — Command aliases
ALIAS with no arguments displays all currently defined aliases.ASSOC — File extension associations
ASSOC — File extension associations
ASSOC with no arguments lists all current associations. Assigning an empty string (ASSOC .EXT=) removes the association.HISTORY — Command history
HISTORY — Command history
| Switch | Effect |
|---|---|
/C | Clear the command history buffer |
HISTORY with no arguments prints all previous commands in reverse chronological order.System
CLS — Clear screen
CLS — Clear screen
DATE — Show or set date
DATE — Show or set date
TIME — Show or set time
TIME — Show or set time
VER — Show version
VER — Show version
CHCP — Change or display active code page
CHCP — Change or display active code page
CHCP with no arguments displays the active code page number. Note that changing code pages is not supported in PC-98 or JEGA/AX machine modes.VERIFY — Write verification
VERIFY — Write verification
ON, each disk write is verified by re-reading the sector.VOL — Volume label
VOL — Volume label
BREAK — Ctrl+C checking
BREAK — Ctrl+C checking
ON, checks happen more frequently (on any DOS call).CTTY — Change console device
CTTY — Change console device
EXIT — Exit the shell
EXIT — Exit the shell
HELP — Display command help
HELP — Display command help
COUNTRY — Set country code (Z:\SYSTEM\COUNTRY.COM)
COUNTRY — Set country code (Z:\SYSTEM\COUNTRY.COM)
COUNTRY is not a shell built-in — it runs as the program Z:\SYSTEM\COUNTRY.COM.ADDKEY — Inject keystrokes (Z:\BIN\ADDKEY.COM)
ADDKEY — Inject keystrokes (Z:\BIN\ADDKEY.COM)
ADDKEY is not a shell built-in — it runs as the program Z:\BIN\ADDKEY.COM.Drive Management
SUBST — Substitute drive letter
SUBST — Substitute drive letter
LFNFOR — Long filename FOR loops
LFNFOR — Long filename FOR loops
FOR loops expand to long filenames (LFN) or short 8.3 names.Capture & Debug
DX-CAPTURE — Toggle A/V capture
DX-CAPTURE — Toggle A/V capture
| Switch | Effect |
|---|---|
/V | Toggle video (AVI) capture only |
/W | Toggle audio (WAV) capture only |
DEBUGBOX — Launch debugger
DEBUGBOX — Launch debugger
LH / LOADHIGH — Load into upper memory
LH / LOADHIGH — Load into upper memory
INT2FDBG — INT 2Fh debugging (Z:\DEBUG\INT2FDBG.COM)
INT2FDBG — INT 2Fh debugging (Z:\DEBUG\INT2FDBG.COM)
INT2FDBG is not a shell built-in — it runs as the program Z:\DEBUG\INT2FDBG.COM.