Skip to main content

Documentation 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.

The MOUNT command is DOSBox-X’s primary way to bridge your host operating system and the emulated DOS environment. It maps a real folder on your computer to a drive letter that DOS programs can read and write just like a physical disk. Every DOSBox-X session starts with only the built-in Z: drive available; all other drive letters must be mounted before they can be used.

Syntax

MOUNT <driveletter> <hostpath> [options]
  • <driveletter> — A single letter A–Z to assign inside DOS.
  • <hostpath> — The absolute path on your host system to the folder you want to mount.
Running MOUNT with no arguments lists every currently mounted drive.

Options

-t <type>

Drive type to emulate. Valid values: dir (default directory drive), floppy, cdrom, or overlay.

-freesize <mb>

Amount of free disk space in megabytes to report to DOS programs. Useful for installers that check available space.

-label <label>

Volume label to report. Up to 11 characters. If omitted, DOSBox-X derives a label from the folder name.

-ro

Mount the drive read-only. DOS will not be able to write, rename, or delete any files through this drive.

-nocachedir

Disable directory caching. Use this when host files change frequently and you need DOS to see updates immediately.

-norecursive

Do not process subdirectories when scanning for drive content.

-u

Unmount a previously mounted drive. Pass the drive letter as the sole argument after -u.

-q

Quiet mode — suppress the confirmation message after a successful mount or unmount.

Examples

REM Mount a folder as drive C:
MOUNT C C:\Users\you\dosgames

REM Mount as a floppy drive
MOUNT A C:\floppy -t floppy

REM Mount a folder read-only as D:
MOUNT D C:\cdrom -ro

REM Mount with a custom label and reported free space
MOUNT C C:\games -label GAMES -freesize 200

REM Unmount drive C:
MOUNT -u C
On Windows, use backslash (\) as the path separator for the host path. On Linux and macOS, use forward slash (/). You can quote paths that contain spaces: MOUNT C "C:\My DOS Games".

The Z: Drive

DOSBox-X automatically mounts a built-in virtual drive at Z:. This drive is read-only and contains the internal utilities that DOSBox-X provides to the DOS environment, including MOUNT.COM, IMGMOUNT.COM, IMGMAKE.COM, CONFIG.COM, RESCAN.COM, and several other helper programs. You cannot unmount Z:, but you can relocate it to a different letter using MOUNT -Z <newletter> if you need that letter for another purpose.

Mounting at Startup with [autoexec]

Rather than typing MOUNT commands every session, add them to the [autoexec] section of your DOSBox-X configuration file. Lines in that section run automatically when DOSBox-X starts, before the DOS prompt appears.
[autoexec]
MOUNT C C:\Users\you\dosgames
MOUNT D C:\cdrom -t cdrom -ro
C:
Place your MOUNT commands before any CD or program launch commands so the drives are available when those lines execute.

Refreshing the Drive Cache

DOSBox-X caches the host directory listing for performance. If you copy, move, or delete files on the host while DOSBox-X is running, the DOS side may not reflect those changes immediately. Run the RESCAN command inside DOSBox-X to force a cache refresh.
REM Rescan the current drive
RESCAN

REM Rescan a specific drive
RESCAN D:

REM Rescan all mounted drives at once
RESCAN -A

Creating a Virtual Subdirectory Drive with SUBST

The SUBST command lets you assign a new drive letter to a subdirectory of an already-mounted drive. This mirrors the behaviour of SUBST in real DOS and is useful for programs that require a specific drive letter.
REM Assign drive E: to a subdirectory on C:
SUBST E C:\GAMES\MYGAME

REM Remove the substitution
SUBST E /D

Overlay Drives

Mounting a drive with -t overlay creates a write-overlay on top of an existing drive. Files from the base drive are visible and readable, but all writes go to the overlay directory instead. This is useful for keeping original game files pristine while still allowing a program to save data.
REM Mount the base drive
MOUNT C C:\games\myoldgame -ro

REM Layer a writable overlay on top
MOUNT C C:\overlays\myoldgame -t overlay
The overlay directory must be on the same host filesystem type as the base drive, and it cannot be the same directory as the base mount path. DOSBox-X will report an error if either condition is violated.

Automatic Drive Mounting (Windows)

On the Windows build of DOSBox-X, host drives can be mounted automatically at startup. Two configuration options in the [dos] section control this behaviour:
[dos]
automount    = true   # enable auto-mounting of Windows drives
automountall = false  # if true, mount all available drives at start
You can also mount individual drives at runtime through the menu: Drive → Mount a Drive. The dialog lets you choose a drive letter and folder without typing any commands.
Use Drive → Mount as Hard Drive / CD-ROM / Floppy for quick access to type-specific mounting dialogs that set -t automatically.

Build docs developers (and LLMs) love