How do I find retrieve the "My Documents" qualified path?

  • Thread starter Thread starter JuLiE Dxer
  • Start date Start date
J

JuLiE Dxer

Is there a way via C# to programmatically retrieve the full path name
to folders like "My Documents" ??

I'm seeing examples with the use of Shell32 stuff I believe,

SHGetSpecialFolderLocation

and I have no knowledge nor experience using such stuff. I've seen
some examples pertaining to these special folders but it's all Greek
to me and I'm sure somebody here could explain it 100 times quicker
and clearer in a fraction of the wording.

Thanks for any help...

MsJ
 
The System.Environment.SpecialFolder defines a set of special folders, like
My Documents,
which is represented as System.Environment.SpecialFolder.Personal.

string path =
System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
Console.WriteLine(path);
Console.Read();
 
The System.Environment.SpecialFolder defines a set of special folders, like
My Documents,
which is represented as System.Environment.SpecialFolder.Personal.

string path =
System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
Console.WriteLine(path);
Console.Read();

Thanks a bunch..

I just stumbled across a similar post in this group back in 2002 via
google groups. Thank goodness you posted this, though. I was just
about to give up on the google search !

System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal))


tusen tak Dennis fra Norge? hhehe

mange tak ingen
 
I'm from Oregon :)

Jeg er fra Oregon :)

I know a little norsk, though.

jeg kan litte norsk her :)
 
That is cool, a guy from Oregon speaking norwegian!

I am swedish but live in Oslo.
 
Back
Top