Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Low level
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00598183
Message ID:
00598216
Views:
19
When I want to loop through a series of files in a specific subdirectory, this is what I do. It's a bit involved but it works for me.

ADIR(somearray)
CREATE CURSOR curs1 (fname c(30))
APPEND FROM ARRAY somearray
cOPY TO ARRAY bestarray
FOR EACH AA IN bestarray
*** process each file here ***
ENDFOR

If I only want to process DBFs in the subdirectory I limit the ADIR with '*.DBF' and do the following in the cursor to just get the dbf name with no extension or period.
REPLACE fname WITH LEFT(fname,AT('.',fname) - 1) FOR '.' $ fname

>thanks anyway but it still doesn't work
>
>Sandy
Previous
Reply
Map
View

Click here to load this message in the networking platform