Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Count more than 65,000 files in directory
Message
From
14/11/2000 12:37:21
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00441608
Message ID:
00441688
Views:
16
>>I'm working on a data transfer project where ARC files are expanded into new directories and ADIR() is used to return the file names and file count.
>>
>>When there are more than 65,000 files expanded, VFP 6.0 errors with Too many variables. (array limit reached).
>>
>>How can I test for the number of files prior to calling ADIR()???
>>
>>I considered running DIR * TO FILE (filename) but I figure, the overhead of
>>writing a 65,000 line file to disk multiple times, is more than the system will bear.
>>
>>Any and all suggestions will be appreciated.
>>
>>_Curtis
>
>In addition to what Cetin and Ed said, you can loop through the directory using SYS(2000). If you are only dealing with files (and not directories), it will most likely work for you.

Yep - the only problem is that you have to iterate through the entire directory just to get the count.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform