Page 1 of 1 1
Topic Options
#128996 - 2004-11-04 03:10 PM problem to start generated batch file
Anonymous
Unregistered


Hi Folks

I have a problem to run a generated batch file in a script.
If I try it manual it works

Here a sample

$month = @MonthNo
$year = @Year

IF Open( 3 , "d:\kix\vh.bat" , 5 ) = 0
$x = WriteLine ( 3 , "cd\" + @CRLF + "d:" + @CRLF + "cd kix" + @CRLF + "VHISTEXP.exe " + "$month" + "*" + "$year" + ".log")
EndIf
Sleep 5
run "d:\kix\call.bat"
exit

Can you help me
Thanks

Top
#128997 - 2004-11-04 03:12 PM Re: problem to start generated batch file
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
It's a BATCH file, so you need to run it with a BATCH interpreter:
Code:
run '"'+%COMSPEC%+'" /C "d:\kix\call.bat"'


Top
#128998 - 2004-11-04 03:14 PM Re: problem to start generated batch file
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
...you also need to Close() the file before you run it, or it won't have been written to disk.

All the commands in the batch file can be emulated in KiXtart - any reason you are doing it this way?

Top
#128999 - 2004-11-04 06:27 PM Re: problem to start generated batch file
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
ja for sure ... scratch the BAT file and do it in Kix. We can help if you need assistance.
Top
#129000 - 2004-11-05 09:48 AM Re: problem to start generated batch file
Anonymous
Unregistered


I`m really new in writing scripts and I don't know what is possible to make with it, but thanks for your answer.

Bye Jimmy

Top
#129001 - 2004-11-07 02:25 PM Re: problem to start generated batch file
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Might be time to read the KiXart Manual to discover the potential of KiXtart.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1471 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.043 seconds in which 0.018 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org