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 :-)
Yes, this looks very nice.
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?).
There's a place for %%tokens and all that, but not for my silly RAMDRIVE, it's just to hold a few temp files and the pipe | with MORE.
http://www.coli.uni-sb.de/~eric/stuff/soft/specials/finddisk.zip (the binary is 511 bytes big...)
smaller than a boot sector! -- Gerry Hickman (London UK) ------------------------------------------------------- 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