I've been doing some mucking around with DOSbox lately, and one particular task I've been doing is setting up a series of batch files for calling things so that I can save a few cds. A typical .bat file might look like the following:
cd wolf3d
wolf3d -goobers
cd ..
One thing that's become a bit annoying is the lack of a built-in text editor that I can use, such as pico/nano. That said, I do have QBASIC installed, so one option I was considering was setting up so I could do a call such as the following:
nano filename.bat
and it would open up the file in QBASIC.
I've done a bit of reading on how batch scripting works, and it appears that just adding a %1 to the script should suffice, such as the following:
cd qbasic
qbasic %1
cd ..
What ends up happening, however, is if I type in, say nano nano.bat so I can edit the batch file, it ends up opening up a new, blank nano.bat file instead.
I've tried to look up what I'm missing here, but this seems to be a bit too arcane to locate easily. Can anyone point out what's missing here?
Thanks!
cdin the file it would still catch the right path when getting the initial variable value. So I guess you're suggesting something likeqbasic ..\%1for the second line? I'm not in a place to test that right this moment, but once I get back to my desk I'll give it a shot. It definitely makes a lot of sense, now that you point it out. – Kaji Apr 04 '17 at 13:25