Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the total numbers of files of a folder
Message
From
03/10/2005 08:16:01
 
 
To
03/10/2005 07:48:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01055451
Message ID:
01055464
Views:
12
>>>>>Hi !
>>>>>
>>>>>Is anybody have an idea to get the total numbers of files of a folder. We have more than 20000 files in a folder and we want to check the total numbers of files exist in folders.
>>>>>
>>>>>We have tried =ADIR() function to the same but it give an error "Invalid subscript reference" or "subscript out of range".
>>>>>
>>>>>
>>>>>Thanks in advance
>>>>>Ravi Mehrotra
>>>>
>>>>I just tried
>>>>?ADir(dummy,'mypath\*.*')
>>>>with a directory with more than 54000 files. Worked fine.
>>>Tore, didn't you tryed this with VFP9?
>>>VFP8 still has a limitation for Maximum # of elements per array 65000 (54000*5=270000)
>>
>>Yes, I tried it with VFP9. Does anyone still use older versions?
>
>Ravi pointed the version.
>And I do till today :-) From now on I move to VFP9. Hurray!

Congratulations, better late than never!

I guess Ravi must stick to something like
List file like yourpath\*.* to file dummy.txt
lcDummy=FileToStr('dummy.txt')
?GetWordCount(lcDummy)
This will no give the exact number of files, because the dummy.txt file will include some additional information.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform