Forgive my ignorance but I need to use an array and have a couple of questions. I have a file that contains a list of files that I need to read into an array. The script is located below. The number of lines in the file will vary. I know I can count the lines close the file and then reopen it so I can start at the beggining but is there a way to tell kixtart to begin reading at the begining of the file.

$filelist=e:\files.txt
$lines=0
$num=0

Shell "%comspec% /c dir e:\fanout\apps /s /b > $filelist"

open (1,$filelist,2)

;Counts the number of lines in the $filelist file

;readline (1)
;while @error="0"
; $lines=$lines + 1
; readline (1)
;loop

;Reads the $filelist file into an array called file

dim $file[7]

while @error = "0"
$file[$num]=readline (1)
$num=$num+1
loop

CLOSE (1)

EXIT