|
Hello Kix folks.
Am trying a fairly simple check in script for the existence of two files, I get the feeling my syntax is wrong as the script just runs right through it, or if $variable1 exists it displays the messagebox.
Script sample:
$variable1="c:\@userid1.txt" $variable2="c:\@userid2.txt" $Message="You have both files"
IF EXIST ("$variable1") AND ("variable2") Mesasgebox ("$message", "***You have both files***",0,10) Exit ENDIF
END script sample
There's a variety of other things going on in this script, but the result of this file check is important for the rest of the script processing.
Additionally, I have another minor problem with trying to use "RUN" to launch a CMD script. The CMD script has a "wait" in it, and that in turn is keeping the Kix script which launched it open.
To quote the manual....
This behavior is different from the MS‑DOS – based version of KiXtart, where the RUN command also terminates the script. If you want to emulate the MS‑DOS – based version, you must add an EXIT command after the RUN command
So if I'm using:
RUN "c:\scripts\file.cmd" Exit
where does the Exit fit in? I have it the line after and it's not being picked up.
Thanks much,
TS
|