"my documents" location

B

Bruce

Does the .NET 1.1 framework provide a mechanism to navigate directly the "my
documents" folder of the current user? (Specifically, I want my application
to write a config file into the user's My Douments directory. But I do not
want to have to force the user to navigate manually to "C:\Documents and
Settings\myName\My Documents.")
Thanks,
Bruce
 
J

Jon Skeet [C# MVP]

Bruce said:
Does the .NET 1.1 framework provide a mechanism to navigate directly the "my
documents" folder of the current user? (Specifically, I want my application
to write a config file into the user's My Douments directory. But I do not
want to have to force the user to navigate manually to "C:\Documents and
Settings\myName\My Documents.")

See Environment.SpecialFolder. I believe "Personal" is what you're
after.
 
B

Bruce

That did it...

string fileLocation = Environment.GetFolderPath(
System.Environment.SpecialFolder.Personal);

Thanks, Bruce
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top