Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I have a variable called %venid% which a program makes with 4 numbers in it e.g 8086, which I have another program uses to read from a ini file. My problem is that the second program then makes a variable called the 4 numbers e.g 8086 and have for example c:\driver\intel in it. The only place where the 4 numbers are standing is in the venid var. and I need to somehow get them so I can read the string in the e.g 8086 var.
I have tried with the following, but it seems like it will not work when the var. is made by numbers.
venid=8086
8086=c:\drivers\intelset driver=%%%venid%%%
if the content in the venid are numbers e.g 8086 it do not work. But if the content are e.h hello and I got a var. called hello with the content hello=c:\drivers\intel, then the driver var. will be driver=c:\drivers\intel.
When the venid is = 8086 then the driver var. will be driver=%8086%.I need the driver var. to have the content of the 4 numbers var.
Hope that someone can help me.

Here the batch to do the trick; I tested it under plain DOS 6.22 and worked fine. It relies on the property of batch files to interpret the = character after the filename as a separator like blank.
@Echo Off
Rem The following two lines to setup a test case
Rem ---------------------
Set venid=8086
Set 8086=C:\drivers\intel
Rem ---------------------Echo Set driver=%%1 > %venid%.bat
Set | Find "%venid%=" > %0$1.bat
Call %0$1Del %0$1.bat
Del %venid%.bat
Echo driver=%driver%

Set | Find "%venid%=" > %0$1.bat
don't work it says that its a wrong command or file name.
Are there any .exe or .com files from dos I need to get it to work ?? it's running on a normal win98 dos boot disk.

It's unlike a bootdisk has Find.exe (external) command on it, as it is not one of the standard commands required to accomplish any boot related task (as Fdisk, Sys and others are).
You can find "Find.exe" in the C:\Windows\Command directory on the hard disk and copy it onto your boot diskette.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |