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.

Persistent Command History for 4DOS / DOSBox

  |  | 

One thing I like about bash-style shells is the possibility to go back through my command history – even across sessions. 4DOS (which I use in DOSBox-X) can also be configured to keep a history, but it is empty when a new session is started.

Unfortunately, I could not find a solution for this online.
So I had to come up with a fix for this:

Add this to your 4DOS.INI or the [4DOS] section of your DOSBox .INI file:

History = 768
HistLogOn = Yes
HistLogName = C:\TOOLS\4DOS\4DOSHLOG

This will activate logging.

 

Next, add this to your AUTOEXEC.BAT:

history /R C:\TOOLS\4DOS\4DOSHLOG

This will add your history log to the log memory.

 

Lastly, consider adding this alias to your 4START.BTM (this is where my aliases are stored):

alias delhist = history /f ^ del c:\tools\4dos\4DOSHLOG /q

This  alias will clear your history and empty your history log file:

Now you have a persistent command history in 4DOS / your DOSbox installation.