Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check user's rights
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01210145
Message ID:
01243355
Vues:
26
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform