Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Namespace is not returning a true directory name
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
01235257
Message ID:
01235260
Vues:
19
my bad, here is the correct sample
CLEAR

lcDir = [C:\Documents and Settings\Administrator\]

loShell = CreateObject("Shell.Application")
loFolder = loShell.Namespace( lcDir )

For Each lcFileName in loFolder.Items

	lcName 		= loFolder.GetDetailsOf(lcFileName, 0)
	lcFullPath 	= lcDir + lcName
	
	if !directory(lcFullPath)  
		?'Dir not found: ' + lcFullPath
	ELSE
		?'        found: ' + lcFullPath	
	ENDIF 
	
NEXT 
>Mike,
>
>lcDirName is the name of the folder returned, not the full path
>See below
>
>>Namespace is not returning a true directory name. How do I get around this?
>>
>>
>>CLEAR
>>
>>lcDir = [C:\Documents and Settings\Administrator\My Documents\]
>>
>>loShell = CreateObject("Shell.Application")
>>loFolder = loShell.Namespace( lcDir )
>>
>>For Each lcFileName in loFolder.Items
>>	lcDirName = loFolder.GetDetailsOf(lcFileName, 0)
>         lcDirName = addbs(lcDir ) + loFolder.GetDetailsOf(lcFileName, 0)
>>	if !directory(lcDirName)
>>		?'Dir not found: ' + lcDirName
>>	ENDIF
>>NEXT 	
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform