Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check user's rights
Message
 
 
To
24/07/2007 19:30:11
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01210145
Message ID:
01243355
Views:
23
>i finally written a program that simply gets folders list and loops thru them and try to write dummy file in each folder and delete it afterwards. if any of the actions failed that means user does not have full rights on this folder.
>so far its working fine but some new issue came up recently and hoping you'll have ideas to resolve .
>probalem is,at some client sites ,in some folders they may have more than 40,000 files(around 30gb) files and my following code taking lot of time and users complaining abt it.
>
>SET DEFAULT TO (tcFolderPath)
>m.lnCnt = ADIR(laFolders,'',"D") && this taking lot of time
>
>as you can see am trying to get only folder names nothing else why above takes lot of time even though the folder in question has only one sub folder!!
>any ideas to speed it up will be much appreciated. Thank you.

I think I saw a recent discussion on a similar topic recently, but I don't remember there. Anyway, you may either use FileSystemObject or WMI.

With FSO you can try:
oFSO = CREATEOBJECT("Scripting.FileSystemObject")
     oFolder = oFSO.GetFolder("gcFat+'thread\")
     ?oFSO.oFolder.subFolders.count
UPDATE. Sorry, didn't see Hugo's reply when I wrote mine.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform