Article ID: 66292 - Last Review: May 10, 2003 - Revision: 2.0 Reading Text Files into MS-DOS Environment VariablesThis article was previously published under Q66292 SUMMARY
This article describes the several steps needed to use the results of
a query (using the FIND filter) as a replaceable parameter in a one or
more batch files. A use for this would be to search for a specific
file and then perform some action on or with this file. The file could
then be used in one or more batch files as a replaceable parameter.
MORE INFORMATION
First, you need to set up a one-line file with the partial command
set varname= The file would look like this on the screen: C:\>COPY CON INIT.TXT SET VARNAME=^Z
NOTE: This process works for directory names only if MS-DOS 5.0 or 6.0 is being used. Under MS-DOS 5.0 and 6.0, the /B switch must be used when you are searching for a directory name. The following is an example of searching for a directory under MS-DOS 5.0 or 6.0. dir /b | find "dos5" > textfile APPLIES TO
| Article Translations
|

Back to the top
