If you want to be absolutely sure that you don't produce
false results with ADIR() check the attributes on the
array the function produces. Don't just depend on the
first results that your given. Use every bit of information
that is return to you by the function to determine whether
or not you got what you're asking for.
The following code will return a number of the occurances
that it found which matched the criteria you sent it:
nSomeVar = ADIR(aAnArray, "C:\TEMP", "D")
If you have a temp directory and a temp file nSomeVar = 2.
However, you have nAnArray that you can check for the
existance of a directory by looping through it and checking
nAnArray(n,5) = "D"
From there you can determine whether or not you've got the
exact results you're looking for.