Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADIR Doesn't Respect Arrays
Message
De
15/09/1999 12:59:35
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00265065
Message ID:
00265073
Vues:
15
>
>My stinky code:
>
>	nNumFiles = adir(arFileList,_arRegSet[11,2]+'\*.*')	
>	for nLoopMe = 1 to nNumFiles
>		cTempString = arFileList[nLoopMe,1]+chr(13)
>	next nLoopMe
>	nCharsWritten = StrToFile(cTempString,'TarInput.txt')
>
>
>
>This bombs because nNumFiles returns 0.
>
>If I change the first line of code to read
>
>
>        nNumFiles = adir(arFileList,'e:\src\projects\t1\*.*')	
>
>
>It works fine, but I can't hardcode my paths. Help?

Is it possible that the array element has not been alltrimed. I attempted similar code and it worked fine.
DIMENSION aFileDir[1]
aFileDir[1] = "c:\temp"
?ADIR( aFileList, aFileDir[1] + "*.*" )
Returns 10 on my machine.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform