Page 1 of 1 1
Topic Options
#58639 - 2001-08-27 05:55 PM Using Kix DIR command
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
Guys -
I am unclear on how Kix DIR command works, or is supposed to work.

My goal is to have it scan a DIR, writing each file/dir encountered as a variable. Then, the variable will be evaluated for a specific condition.

For example, my test below

code:

$SrcDrv = "C:"
$SrcDir = "TEMP"
$x=0
$File = DIR ("$SrcDrv\$SrcDir\*.*")
WHILE @ERROR = 0 AND $Tmp <> 1 AND $x < 10
? "Err: @ERROR / $File"
? "Fil: $File"
?
SELECT
CASE UCASE ("$File") = "ESCAN")
$Tmp = 1
CASE (1)
DIR ()
$x = $x+1
ENDSELECT
LOOP


I would expect the variable $File to contain the results of this scan, and print on the screen display where noted. In actuality, the lone '?' displays the DIR result, and the variable $File is blank. If you leave a single line to display (? "Fil: $File") it will appear the variable contains the DIR result, but this is false.

So, can anyone enlighten me on this?

Thanks.

Bill

Top
#58640 - 2001-08-27 06:09 PM Re: Using Kix DIR command
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Bill - the KiXtart manual has a typo - the format for your second call to dir() should look like this ...

code:

...
CASE (1)
$File = DIR ()
$x = $x+1
...

-Shawn

Top
#58641 - 2001-08-27 06:15 PM Re: Using Kix DIR command
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
Thanks Shawn!
Top
#58642 - 2001-10-15 06:49 AM Re: Using Kix DIR command
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

For other possible typo in the documentation see topic for some
additional remarks:
http://kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=3&t=000148
It is a review of the documentation of kixtart 2001 beta release.
Greetings.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
Page 1 of 1 1


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

Who's Online
1 registered (mole) and 1300 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.04 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