Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WSH and Subfolders of Subfolders
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00224547
Message ID:
00224966
Vues:
19
Hiya Patric,

I haven't run a comparison for speed, but you can apply the same recursive tecnique using ADir() as well:
*
* tree.prg
*
lparam cDir
private x, aFolders, nDir

?cDir

if right(cDir,1) # '\'
	cDir = cDir + '\'
endif

nDir = aDir(aFolders, cDir + "*.*", "D")
for x = 1 to nDir
	if 'D' $ aFolders(x,5) and aFolders(x,1) # '.'
		=tree(cDir + aFolders(x,1))
	else
		? cDir + aFolders(x,1) 
	endif
next x
return
>So far I've been able to improve speed a little using WSH and pouring the results of what I'm doing into a table, but I really wish ADIR() worked as advertised. (I've NEVER been able to get info contained more than one subfolder deep, even when using the D switch with ADIR().)
>
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform