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 :-)

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?).

C:\>finddisk /?
Public Domain disk finder by EA 2005
 
Usage:
  FINDDISK [X:][+]LABEL
Search LABEL on drives C:-Z:, case-sensitive.
  X:  check only 1 drive
  +   go to the found drive
  ? * wildcards, e.g. DO?-BI*
Returns:
  1,4,... A:,D:,... matches
  0 no match
 
http://www.coli.uni-sb.de/~eric/stuff/soft/specials/finddisk.zip
(the binary is 511 bytes big...)

Eric



-------------------------------------------------------
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