Subj : Re: How to detect RAM disks (Was: how to detect cdrom?) To : Steve From : Outsider Date : Thu Feb 14 2002 05:28 pm From: Outsider@f3.n342.z1.cereal.mv.com (Outsider) Subject: Re: How to detect RAM disks (Was: how to detect cdrom?) From: Outsider E. S. (Steve) Fabian wrote: > > Outsider wrote: > > > > E. S. (Steve) Fabian wrote: > > ....snipped > > > I have questions. > > > > > > 1) This being a 4DOS forum, are the above command procedures 4DOS .btm > > > files? If so, why is extension .bat used for (apparently) temporary > > > files? If not, what FOREIGN (meaning non-JPsoft) command processor do > > > you need for their execution? > > > > No mention of 4DOS was made in the request by Matthias Paul for a utility > > to find a RAMdrive. I presume MSDOS is not off-topic since it is contained > > in the group name. > > > > #Matthias Paul: > > #> PS. Apparently a good "FINDRAMD" replacement is still needed in > > #> many places. Any volunteer to develop one for FreeDOS > > #> (www.freedos.org)? It would certainly be useful. > > > FreeDOS is NOT MSDOS. Programs that run only in a pure MS environment > are irrelevant to both FreeDOS and 4DOS users. Irrelevant? That cannot be so. In fact, it is the other way around, because 4DOS users can use standard batches by running command.com, whereeas standard DOS users cannot run 4DOS batches. ....snipped > > 3. All the external DOS commands used by the batch files must be present. > > Are any external program needed that are not bundled with MS-DOS > distributions? I am reasonably certain it is self-evident to anyone looking at the two batches that only standard DOS utilities are employed. > > 4. The PATH must be correctly set so all needed DOS commands, including > > command.com, are available. > > > > > 3) Why must a second instance of the command processor be invoked? All > > > command processors sold for the last 15 years included the internal > > > command CALL, since before the availability of MEM.EXE /D? > > > > Because batch file output in MSDOS cannot be redirected. > > > > > 4) The "standard" value of the environment variable TEMP is the full > > > path for the directory to be used by temporary files, e.g. C:\WIN98\TEMP > > > (created by Win98 if windir=C:\WIN98), or it could be Z:\TEMP.DIR, where > > > Z: is a virtual disk, or it may be a subdirectory of a hard disk defined > > > by SUBST. If the subdirectory name has an extension, the syntax is > > > invalid. > > > > You will need to explain that. > > Suppose my virtual disk is Z: and is has a directory "Z:\TEMP.DIR". It > seems your program would have a syntax error if run after executing > > set TEMP=Z:\TEMP.DIR Yes, I see what you mean. Well then, you must choose one requirement or the other. a) %temp% directories must not have an extension. b) %temp% directories must not end with a backslash. ....snipped > WHAT SPECIFIC CHARACTERISTIC OF THE VIRTUAL DISK IS DETECTED BY YOUR > PROGRAM? And how isit detected? MEM.EXE/D |FIND.EXE "=RAMDRIVE" >%temp%.\ramdrv1.dat IF errorlevel 1 ECHO RAMDRIVE not installed > > I have not tested the algorithm on non-MSDOS RAM drives; I > > believe it may work, but am not sure about it (since I > > have not tested). > > Will it work in a Win95/98/NT/XP environment? NT OS's, including NT 5.0 (2000) and NT 5.1 (XP) are not DOS based and are completely out of the DOS picture. They include a so called 'DOS emulator', but that is not DOS. I see no reason why the two lines won't work in Win 4.x (95/98/ME) versions -or in DOS 7.x before running Windows, or after closing Windows. Did it work for you? Why are you really asking all these questions about the batches if you haven't tried them (or even looked at them from what I can gather). > > BTW, Do you mean to say that it is disallowed for 4DOS users to > > run a command.com shell and run MSDOS batches? > Disallowed - no. Unnecessary - 99% of the time. For example, 4DOS > permits redirection of batch program outputs; allows specification of > how much free environment space must be guaranteed to a program executed > by it; has feature to create a unique temporary file in a specified > directory; permits multiple commands anywhere a single command could be > executed; compound IF conditions; iff/then/elseiff/else/endiff groups; > switch (case) statement; counted FOR and DO loops; FOR statements and DO > loops with each line of a file as their argument; parsing > filespecifications into drive, directory, name, extension; functions to > test whether or not a given drive is ready, remote, cdrom, removable, > what its label is, free, used, and total space; use the first line of > output from a program (.com, .exe, or batch) as if it were an > environment variable; compare the ages of two files; etc. What requires > twenty different external programs with Microsoft's COMMAND.COM is all > internal, no program activation delays. At last, some worthwhile information on 4DOS. Great! 1) Perhaps you should consider that many 4DOS users may need standard batches so they have solutions that are portable to other systems w/o 4DOS. 2)Many 4DOS users may already have perfectly fine standard batches that they don't want to spend time re-writing. Why re-invent the wheel. Or, don't fix it if it ain't broke, if you prefer. -- Outsider -- |Fidonet: Outsider 1:342/3 | | Origin: The Cereal Port BBS (603)899-3335 199.125.78.133 (1:132/152) --- # Origin: (1:132/152.4) * Origin: Baddog BBS (1:218/903) .