Mounting folders in DOSBox during Boot

Here is a quick fix to a chicken-egg problem: You need to run the mount command to mount folders in DOSbox, e.g., to set up your C:\ drive. Usually, you would run the mount command from your AUTOEXEC.BAT – but the “drive” where your AUTOEXEC.BAT is located is not mounted yet because you did not mount it yet.

The solution is to use the [config] section of your DOSBox .ini file:

install = mount.com c ~/Documents/DOS > NUL

The INSTALL command loads drivers during boot time.

This allows you to run the mount command and set up your C drive first.

Now, you can also add an AUTOEXEC.BAT to the “boot folder” and execute this. Add the following section to your DOSBox .ini file:

[autoexec]
@echo off
call c:\autoexec.bat

Now you have a mounted C drive and an AUTOEXEC.BAT as you would have in regular DOS.