Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
My Documents Folder
Message
From
28/09/2005 19:16:53
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
28/09/2005 19:12:22
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8
Miscellaneous
Thread ID:
01054279
Message ID:
01054280
Views:
13
>I have been asked by my client to save data files to the "My Documents" directory. I am referring to the "My Documents" folder at the head end of the drive above drive C:\.
>
>I have found that the getdir() function puts up a tree for normal directories starting with C:, D: etc. but nothing for the head end. I also find that if simply type in the directory name as MY DOMUMENTS and attempt to save there, it does not work.
>
>Is there some way of naming the "My Documents" folder so that it is accessible by VFP?

Depending on what commands you use, the space in "My Documents" can cause problems.

This would work:
copy ... to "c:\My Documents\File1.txt"
as well as this:
Destination = "c:\My Documents\File1.txt"
copy ... to (Destination)
But this will not:
Destination = "c:\My Documents\File1.txt"
copy ... to &Destination
Also: My Documents is not always in the same location, and the name may change (for example, in Spanish versions of Windows: "Mis Documentos"). You should use the corresponding API or WSH to get the folder name. If you need this, search for the download by George Tasker that creates shortcuts - this one includes the functions required to obtain get "special folders".
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform