[GEM Development] Batch File Programming for GEM.BAT

Shane M. Coughlan shane at shaneland.co.uk
Sun Mar 19 13:54:45 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Night Hawk wrote:
>  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.

Hi Todd

I have one question: if the utility finds a drive letter that does not
exist (say "Z:"), what action will it take?  I assume it would then say
that this drive letter can be used for the SUBST action?

Example:
On a machine with a A:, C: and E: drive the utility runs and finds Z: is
free.  It also finds Y: is free.  Therefore the utility sends Z: into
the environment as %SWAPDRIVE% and Y: as %GEMDRIVE%.  This allows
GEM.BAT to run with the following two lines:

 subst %SWAPDRIVE% C:\OPENGEM\GEMSWAP
 subst %GEMDRIVE% C:\OPENGEM

Am I correct in this assumption?

By the way, as far as I know FreeDOS uses the same function calls as
MSDOS.  It is intended to be 100% compatible.  I have posted to the
FreeDOS list for additional confirmation.

Regards

Shane


- --
Shane Martin Coughlan
e: shane at shaneland.co.uk
m: +447773180107
w: www.shaneland.co.uk
- ---
Projects:
http://mobility.opendawn.com	http://gem.opendawn.com
http://enigmail.mozdev.org	http://www.winpt.org
- ---
Organisations:
http://www.fsfeurope.org	http://www.fsf.org
http://www.labour.org.uk	http://www.opensourceacademy.gov.uk
- ---
OpenPGP: http://www.shaneland.co.uk/personalpages/shane/files/publickey.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3-cvs4067* (MingW32)

iQCVAwUBRB1ipdwG3M95JPpzAQjUFwP/VOaioja/iNWdl8KllhoWJLedFw4jkMQJ
h2RlOW4IhMVmNnKKyEo0SnWVXDjAQezRicSKkFI3b4h5xSmb9KRopKbZ+cpbgmFa
Z3xm9JMkAkwDtGCgubI1Q6hMiI9hchUPmJxKxi+0L/eSZrZG/6X//RnqHSV+58Nn
FP489wowEdQ=
=Wp9d
-----END PGP SIGNATURE-----



More information about the gem-dev mailing list