Problem
I am writing some .cmd / .bat files on a windows machine that need to work on an sd card with variable parent directories. The sd card will likely change drive names (Drive A, Drive E, etc.) as it moves from device to device and I want to write cmd files that will anticipate that. I would like this to work with my linux steam deck if possible, but if not I understand.
Rom Location E:\Games\Nintendo\3DS\Games\Animal Crossing New Leaf.3ds
Core Location E:\Games\RetroArch\cores\citra_libretro.dll
3DS.cmd , currently works at this address
@echo off
echo Keeping Window Active for GOG Time Tracking
cd "E:\Games\RetroArch\"
"retroarch.exe" -L "cores\citra_libretro.dll" %1 -f
Animal Crossing New Leaf.cmd , currently works at this address
@echo off
call "3DS.cmd" "E:\Games\Nintendo\3DS\Games\Animal Crossing New Leaf.3ds"
Question
How would I write the code above as a windows file on any non-specific drive directory where the current Directory is on the Drive named E:\ ? (Ex: A:\ , or B:, and so on)
CodePudding user response:
I used Chat GPT, it gave me this result that is now working.
3ds.cmd
@echo off
echo Keeping Window Active for GOG Time Tracking
set sd_dir=