Lonkero,
that was it!!!!
Thankyou both so much for helping. Below is what I have ended up with. My next step is to use $finds and output it to a report at the end. Would I be better to use an array to collect the finds or splitting the $finds string?
Phoe.
code:
cls break on
$file = "archlist.txt"
$countf = 0
$ = open(1,$file)
$line = readline(1)
;start with an initial array size of 5
dim $array[5]
$count = 0
while not @error
;let check to make sure you are not over the current array size,
;if we are increase the array size by 10
if $count = ubound($array)
redim preserve $array[ubound($array)+10]
endif
;add a line to the array
$array[$count] = $line
;increase our counter by 1
$count = $count + 1
;get the next line of text
$line = readline(1)
loop
$ = close(1)
;ok, time to trim back to array size to the actual size of the data.
if $count > 0
redim preserve $array[$count - 1]
else
;hmmm looks like no information was loaded... make sure your file
;is avaliable
$array = ""
endif
;just a simple check to show your data in the array...
for each $clientno in $array
; ? $clientno ?
if len($clientno) = 7
$dirno = $clientno
$dirfnd = dir("c:\tmp\kix2001\clients\"+$dirno+"*")
if ($dirfnd <> ".") And ($dirfnd <> "..") And len($dirfnd); > 7 And GetFileAttr($basedir+"\"+$name) & 16)
? "Directory found: $dirfnd" ?
$finds = $finds+ ", " + $dirfnd
else
? "Directory not found: $dirno" ?
; Exit
endif
endif
NEXT
? "Reported finds = " $finds ?