>>>>I need to retrieve the number of files in a folder (possibly a mapped network drive) without using ADIR(). This folder could potentially contain over 10,000 files. Any ideas?
>>>
>>>Why ADIR() is out?
>>
>>I have found ADIR() unreliable on directories with large quantities of files.
>
>That was before VFP9. Anyway, you can use sys(2000) in a loop, but it's slooow
>X=0
>cMask='c:\temp\*.*'
>If !empty(Sys(2000,cMask))
> x = x + 1
> Do While !empty(Sys(2000,cMask,1))
> x = x + 1
> Enddo
>Endif
>Wait x Window
>
Why not using FileSystemObject.GetFolder(lcDir).Files.Count ? -- I write the idea from memory
If it's not broken, fix it until it is.
My Blog