Skip to content

Mounting Your Folders

Outcome: a folder on your real disk appears inside DOSBox as drive C:, files written inside appear outside, and you know the two surprises waiting in the exchange — names and free space.

The command is MOUNT, one of the doors on drive Z:. Give it a letter and a folder:

Z:\>mount c /home/you/dosgames
Drive C is mounted as local directory /home/you/dosgames/
Z:\>c:
C:\>

(Windows readers give a Windows path — mount c C:\dosgames — and macOS readers a macOS one; the ceremony is the same.) The message is worth reading: DOSBox says local directory because that is the truth. Nothing was copied or converted. The folder is being shown to the emulated machine as a disk, live.

The proof is round-trip. In the lab (transcript t02), the mounted folder was listed from inside:

C:\>dir
...
AUTOEXEC BAT                135 30-10-2026 14:07
LEDGER   BAT                420 30-10-2026 14:07
NOTES    TXT                 39 30-10-2026 14:07
QUARTE~1 TXT                 71 30-10-2026 14:07

—and files DOS wrote there (every transcript capture in this guide) were read back on the host afterwards. One folder, two views, no transfer step.

Surprise one: names shrink. DOS filenames are 8.3 — at most eight characters, a dot, at most three more. The host file Quarterly Ledger Notes.txt exists in DOS only as QUARTE~1.TXT: first six letters, a tilde, a number. Under that name it opens fine — TYPE QUARTE~1.TXT printed its contents in the lab. Under its real name it does not exist: File Quarterly Ledger Notes.txt not found. The lab's screenshot of this directory is dosbox-lab/dos-dir.png. The practical rule for anything you plan to use inside DOSBox: name it within 8.3 yourself, in capitals if you want listings to look native, and never rely on two files whose names agree in their first six letters — they will become ~1 and ~2 in an order you did not choose.

Surprise two: the free space is invented. The same listing reports 262,111,744 Bytes free — about 250 MB — because a mounted folder has no size of its own and DOSBox reports a fixed figure unless told otherwise. Programs that check free space before installing may refuse a folder that in reality has gigabytes. The remedy is the mount option -freesize, in megabytes: mount c /home/you/dosgames -freesize 1024 presents a gigabyte. Delete something inside DOSBox, though, and it is deleted on the host, at once, with no recycle bin — the mount is a window, not a sandbox. Chapter 14 says it again because it matters.

A mount lasts for the session. To make it permanent, put the same line in the [autoexec] section of the config file — chapter 7 does exactly that, and chapter 8 explains the machinery.