Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxPro Dos Question
Message
De
17/09/1999 14:17:32
 
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00265057
Message ID:
00266087
Vues:
24
>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
Fil
Voir

Click here to load this message in the networking platform