#36257 - 2003-02-11 08:55 AM
Running a batch file to set Variables
|
bekoz
Fresh Scripter
Registered: 2002-11-07
Posts: 20
|
I nave an executale that does all the date calculation and creates a batch file to set the environment variables with th edates I need. The executable ryns fine but I cannot see the results of the batch file in th ecurrent or any other dos window. I want to call th ebatch file from the Kix script and use the environment variables in the same window. I know that Set Setl and Setm have been discussed many times, but I'm trying to set variables from a batch file. Is this possible? Here is the contents of the batch file.
@ECHO OFF SETM "LASTM=12" SETM YMD=030109 SETM YYYYMMDD=20030109 SETM YYMM=0301 SETM YY=03 SETM MM=01 SETM DD=09 SETM MDY=010903 SETM "YDAY=030108" SETM YDAYDB4=030107 SETM YDAY2DB4=030106 SETM YDAY3DB4=030105 SETM YDAY4DB4=030104 SETM YDAY5DB4=030103 SETM YDAY6DB4=030102
|
|
Top
|
|
|
|
#36258 - 2003-02-12 12:57 AM
Re: Running a batch file to set Variables
|
Darren_W
Hey THIS is FUN
   
Registered: 2001-10-10
Posts: 208
Loc: Bristol, England
|
Hi,
I could suggest to put the values in a text file, read them in a while loop with ReadLine, echo the value with ? , and then call the command with the shell command.
while (values exist) read line from text file echo value run shell with value loop
Darren
_________________________
I want to share something with you - the three sentences that will get you through life. Number 1, 'cover for me.' Number 2, 'oh, good idea, boss.' Number 3, 'it was like that when I got here'.
|
|
Top
|
|
|
|
#36261 - 2003-02-12 10:34 AM
Re: Running a batch file to set Variables
|
bekoz
Fresh Scripter
Registered: 2002-11-07
Posts: 20
|
Sorry, I pasted a changed batch file the actual btch file has the following in it
@ECHO OFF SET LASTM=01 SET YMD=030212 SET YYYYMMDD=20030212 SET YYMM=0302 SET YY=03 SET MM=02 SET DD=12 SET MDY=021203 SET YDAY=030211 SET YDAYDB4=030210 SET YDAY2DB4=030209 SET YDAY3DB4=030208 SET YDAY4DB4=030207 SET YDAY5DB4=030206 SET YDAY6DB4=030205
Jens, I know how to call a Kix script, I use a few scripts that I have written successfully. I just can't figure this out.
|
|
Top
|
|
|
|
#36264 - 2003-02-14 09:40 AM
Re: Running a batch file to set Variables
|
bekoz
Fresh Scripter
Registered: 2002-11-07
Posts: 20
|
You guys have been a real help. Thank you.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2419 anonymous users online.
|
|
|