Hello Jens,

I've read the code carefully. And I do not understand the way kix read files. The rewrite of your code is not working. [Frown]

As I studied this:
code:
  

SHELL '%COMSPEC% /C dir '+$Path+' /s /a-d /-c | find "'+$String+'" >'+$TempFile

OPEN(1, $TempFile)
$Line = READLINE(1)
WHILE $Line<>'' AND @ERROR=0
$PrevLine=$Line
$Line = READLINE(1)
LOOP
$retcode = CLOSE(1)
DEL $TempFile

As i tried to understand what this code does, here is my interpertation:

First line is appending "DIR /S" directory output to a tempfile.
Next line OPEN(1, $TempFile) Is opening the tempfile under handle# 1. $Line = READLINE(1) I guess the READLINE function will read the tempfile's first line and put this in VAR $line.
WHILE $Line<>'' AND @ERROR=0 As long as the $line VAR is not empty and no error occurs. $PrevLine=$Line Put VAR $line in $prefline.

My question is: Why to use the first READLINE before the loop, and Why using a second variable $PrefLine?

Oke, after the loop has finisched, I guess not the $Line variable but the $PrefLine variable would contain the same output as the TempFile did, right?

And then your array code, here is where the script errors. I don't know why maybe the $Line variable is empty or teh syntax is wrong.

code:
  
$array=split($Line,' ')
$files=$array[0]
$bytes=val($array[3])
$megabytes=$bytes/1048576

? $files
? $bytes
? $megabytes

Tell me if iam wrong, just and please help me with this.

-rel
_________________________
This is Unix Country. On a quiet night you can hear NT reboot.