Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting full path of a folder (directory)
Message
From
03/06/2003 09:24:18
Fabian Belo
Independent Developer
Argentina
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00795602
Message ID:
00795618
Views:
16
>>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
Thank you George, BTW in order to solve this issue I've read your article (with Ed Rauh) about WSH translated by Martin Salias at http://www.microsoft.com/spanish/msdn/articulos/archivo/mtj/voices/art03.asp
Very useful.
"Since I've read that alcohol is bad... I quit reading."
Me


http://www.fabianbelo.com.ar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform