>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.
After thinking about this problem some more, I tried the following.
nSomeVar = ADIR(aAnArray, "C:\TEMP\", "D")
I get 2 one for the "." and one for the "..". Will I always get these results? The root returns 0, but will this work with all subdirectories. With the extra back slash you will get 0 files if there is a file with the same name as the directory with no extension.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement