Making DOSBox automatically mount your `~/games` folder
To make DOSBox automatically mount your ~/games folder as the C: drive every time it starts, you can edit the DOSBox configuration file. Here's how to set it up:
Steps:
-
Locate your DOSBox configuration file:
- On Windows, it's usually found in
C:\Users\YourUsername\AppData\Local\DOSBox\dosbox-[version].conf. - On macOS/Linux, it's typically found in
~/.dosbox/dosbox-[version].conf.
- On Windows, it's usually found in
-
Edit the configuration file: Open the
dosbox-[version].conffile with a text editor (e.g., Notepad on Windows ornanoon Linux/macOS). -
Find the
[autoexec]section: Scroll down to the very end of the file until you find the[autoexec]section. This is where you can add commands that DOSBox will execute when it starts. -
Add the mount command: Add the following line to mount your
~/gamesfolder as the C: drive:-
On Linux/macOS, add:
mount c ~/games -
On Windows, if you want to mount a specific folder, use the path like this (assuming your folder is in
C:\Users\YourUsername\games):mount c C:\Users\YourUsername\games
You can also specify different mount points or add other commands, but this one will mount your
~/gamesdirectory automatically as C:. -
-
Save the file: After adding the mount command, save the configuration file and close the text editor.
-
Start DOSBox: Now, every time you start DOSBox, it will automatically mount the
~/gamesfolder as the C: drive.
Example:
Here’s what the [autoexec] section could look like:
[autoexec]
# Lines in this section will be run at startup.
mount c ~/games
c:
If you need any more help with configuration, let me know!