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 22:05:59
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00441608
Message ID:
00441955
Views:
16
>>Yep - the only problem is that you have to iterate through the entire directory just to get the count.
>
>True. But he said he needed file names as well. I'm hoping he is populating some sort of table at this point.

Once you get to the point of iterating through a couple of tons of files, you probably need more than just a name - the File object provides a tremendous amount of information - size, all three file dates if the file system supports them, short name, path ad nauseum. SYS(2000) will be -much- faster if he does iterate through and only needs the names - there's COM overhead for every access of the FSO methods and properties, while I suspect SYS(2000) is just a wrapper on a Win32 API function and native to VFP. Same thinking behind why ADIR() is so much faster than the FSO - COM is expensive.
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
Reply
Map
View

Click here to load this message in the networking platform