"my documents" location

  • Thread starter Thread starter Bruce
  • Start date Start date
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
 
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.
 
That did it...

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

Thanks, Bruce
 
Back
Top