[GEM Development] Batch File Programming for GEM.BAT
Night Hawk
phantom_stranger at hotmail.com
Fri Mar 17 19:02:53 PST 2006
Shane,
Yes, I do have a few ideas. From your last e-mail I gathered that the main
point is to discover which two drive letters are free to use, given that
this will not be known in advance. I can write a small utility in "C" (or
even assembly, but it take longer) to basically ask how much free space
there is on a series of drive letters (and as Owen suggested start with 'Z'
and work down from there). If the drive letter returns an error, then that
drive letter does not exist. Once the utility finds a drive letter that does
exist then the utility can compare the free space returned against the total
size of the drive. If equal then that drive letter is free to use.
From there it's downhill. I will have the utility put the ASCII value of
the drive letter directly into an environment variable so that the new
GEM.BAT file will then just have to do something like
subst %SWAPDRIVE% C:\OPENGEM\GEMSWAP
subst %GEMDRIVE% C:\OPENGEM
The idea is to have the utility get the free drive info and present the
info in such a way for the GEM.BAT file to access it. Then using SUBST will
be easy.
I have a question about FreeDOS...does FreeDOS use the same function calls
as MS-DOS (for file I/O) ?
Todd E. Bedwell
The Night Hawk
More information about the gem-dev
mailing list