Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADIR Doesn't Respect Arrays
Message
From
15/09/1999 12:59:35
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00265065
Message ID:
00265073
Views:
14
>
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform