I want to run a small set of roms and a front end from a Thumbdrive or USB HDD for portablity.
Not sure if this may help or not but I have a thumb drive running mame. What I do now is drag the rom onto the batch file so %1 is the rom that I want to run. The batch file is in the same folder as the roms to make it easier but with some tweaking of the variables it should be easy.
set mame_drive=%~d0
set mame_path=%mame_drive%\mame
set mame_rom_path=%mame_path%\roms
%mame_drive%
cd %mame_path%
mame.exe %1
%0 gives the full path of the batch file the added ~d just pulls the drive letter. From there I set some other variables based on that drive. Finally mame runs with the rom that I dropped on the batch file since %1 is the first argument passed in, ie the rom.
So when I run this at home and drop dkong.zip on the batch file this is what it translates to:
set mame_drive=L:
set mame_path=L:\mame
set mame_rom_path=L:\mame\roms
L:
cd L:\mame
mame.exe L:\mame\roms\dkong.zip