Gerry Hickman schreef:
Hi Eric,

Hi, I suggest that you do something like:
- load the ramdisk and use a known label
set olddir=%_cwd%
finddisk +RAMDRIVE (or whatever your label is, note: case sensitive)
if "%errorlevel%"=="0" goto noRamdiskFound
set ramdisk=%_cwd%
:noRamdiskFound
cdd %olddir%
set olddir=
- you are done :-)

cdd %_cwd%
finddisk +RAMDRIVE
if not "%errorlevel%"=="0" set ramdisk=%_CWD%
cdd -

Finddisk can also return the found drive letter as errorlevel, but
then you need either 20+ "if ... errorlevel ..." lines or a FOR loop
or some "bennylevel" tricks (which FreeCOM versions support those?).

at least 0.83pl3 and newer.

http://www.coli.uni-sb.de/~eric/stuff/soft/specials/finddisk.zip
(the binary is 511 bytes big...)


smaller than a boot sector!

nice :)





-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to