One of the quirks and honestly massive irritations about using Windows vs. Linux is its throwback to the original Microsoft DOS in that all paths depend on drive letters vs. simple paths. In looking to make Launchbox fully portable, I installed it within Dropbox. However, on my various Windows systems, the Dropbox folder resides on different drives (typically either C: or D:) depending on what drives are in the system and where I have space. Since Launchbox maps the ROM locations to, you guessed it, Windows paths that include the drive letter, this means that I cannot simply spin up Launchbox on each system and have it work without manually going in and changing the ROM paths to match the current system.
The solution was to literally use the DOS command SUBST from a command prompt to map the Dropbox folder to a specific drive letter… in this case T: on each of my systems. The syntax is very simple “SUBST T: <actual Dropbox path>”
The only complication was that I didn’t want to do this manually each time I booted the system. The solution was to create a DOS batch file (throwback to 80’s development) and have it run at startup. I created a batch file called startup.bat with contents as follows:
@echo off
:: This batch file is intended to be run at system startup
subst T: C:\Users\<username>\Dropbox
Substitute (pun intended) your actual path to Dropbox. In the example I masked my user name with “<username>”
Then to get it to run at startup/login, press <windows key> type “run” and hit enter, then at the prompt type “shell:startup” which will open a file explorer window to a director where you can put the batch file you want to run at startup. The batch file can be any name, it doesn’t have to be startup.bat.
Once you logout/login, you’ll now permenantly have Dropbox mapped to a specific folder. Do this on all your systems and you will have consistency in path names across said system with respect to anything in Dropbox.
One small quirk about this method is that if you use Windows Subsystem for Linux, the drive substitution will not carry over into the Linux OS. E.g., if you look in /mnt you’ll see your actual drives “c d” but not the SUBST drive you created. Instead, you’ll simply need to create a symlink within WSL to map Dropbox to anyway that makes sense within Linux. In my case I created a sysmlink (ln -s) to the Dropbox folder in my user home directory so that I didn’t have to deal with /mnt/c/Dropbox.


