View Single Post
  #4  
Old January 24th 05, 10:57 PM
Paul Crowley
external usenet poster
 
Posts: n/a
Default

In article ,
says...
Greetings,

I guess my problem is a bit more tedious.
To make things short i need to set an env variable to the output of a batch
or command file

Ie.: set MYVAR = mybatch.bat

Is this possible in Win98?

Thank You


You are looking for an equivalent to a common Unix capability. There
are a few of ways of handling this.

- You can redirect the output of a command to a temporary file and then
read the file into a variable. Reading the file requires a program that
you get to write - there is no such common utility.

- Use a different scripting language. Unfortunately, just about all of
these require installing some product or a big runtime. If that isn't a
problem, you can use Perl - it is free from ActiveState. You can also
use QBASIC - it compiles to an executable. You could probably find a
copy of REXX as well.

- Install MTK Toolkit. It includes a Unix shell with this sort of
redirection capability.

There are probably other solutions, but these would at least keep what
you are doing in interpreted code of some sort.

--
Paul Crowley
Infinadyne -
www.infinadyne.com