Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can foxpro retrieve the path to "my files"-folder 1

Status
Not open for further replies.

georg59

Programmer
Sep 1, 2001
26
DE
I have the problem to save an export file to the my-files-folder that is default by system to the current user.
Does someone know a neat solution?

Georg Nickel
Software Development
Germany

 
I use the Windows Scripting Host to find the users desktop
and you should be able to use the same technique for MyDocuments. They're both "SpecialFolders":

Code:
loShell = CreateObject ('WScript.Shell')
lcMyDocuments = loShell.SpecialFolders('mydocuments')

Geoff Franklin
 
Thanks for this solution.
It works great!

Georg Nickel
Software Development
Germany

 
It works great!

Glad to hear it. The only problem is that some administrators consider the Windows Scripting Host to be a security risk and they disable it. You might need to add code that will ask the user for a path if Fox can't create the Scripting object.

Geoff Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top