Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adir
Message
From
13/02/2008 19:45:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Re: Adir
Environment versions
Visual FoxPro:
VFP 6
Database:
MS SQL Server
Miscellaneous
Thread ID:
01292400
Message ID:
01292457
Views:
21
>Yes that would work, but I often have 300,000 files and reading each one would take a day. I need a process that can accomplish the task within few hours.
>
>Thanks

No, not reading the files themselves; just the information returned in the array, with adir(). First, you load all the files, then you check the array, one row at a time. Finally, you only process the files that have the correct date.

However, since you state that you are using VFP 6, that one has a limit to the size of arrays: 65,000 elements per array. That will give you an error message if you have more than 13,000 files in a single directory (since each file takes up 5 array elements).

VFP 9 permits larger arrays - one of several advantages that would make an upgrade desirable.

On the other hand, there are functions that can help you read larger directories. One is one of the sys() functions - I don't have VFP handy right now. Was it sys(2000)? I am not sure.

Or, you could send the output of the DOS DIR command to a file, and analyze the result.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform