Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting full path of a folder (directory)
Message
 
À
03/06/2003 08:45:49
Fabian Belo
Independent Developer
Argentine
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00795602
Message ID:
00795609
Vues:
16
This message has been marked as the solution to the initial question of the thread.
>Dear all;
>
>This one comes from a Spanish forum…
>In this particular case the full path name of the “Cookies” folder is required which may vary depending on OS.
>I’ve tried WSH (FileSystemObject) which includes several and useful methods to deal with file issues including GetSpecialFolder. No luck so far.
>I’ve also tried a couple of functions as “myadir” available in UT download section which do the work but it takes too much time to read&store folders and subfolders paths (in array or cursor mode)
>
>I think “Cookies” Folder Path is stored somewhere in the registry. I ALSO tried to read the registry at some locations (using Rick Strahl class), i.e.: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders where that path is shown, but the default value is not set, therefore it returns .NULL.
>
>Any ideas? (VFP6.0 SP_ALL)

You can use the Shell.Application for this, but you'll have to parse the path. For example
#DEFINE COOKIES 0x21
oShell = CREATEOBJECT("Shell.Application")
oFolder = oShell.Namespace(COOKIES)
? oFolder.Title
oParent = oFolder.ParentFolder
? oParent.Title
oParent = oParent.ParentFolder
? oParent.Title
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform