My Documents Folder

G

Guest

Hi
I would like to get the path to the My Docuemnts Folder so I can list all
the files / folders in a TreeView.

Thanks John
 
N

Nicholas Paldino [.NET/C# MVP]

John,

Call the static GetFolderPath method on the Environment class. Pass the
value of SpecialFolder.MyDocuments as the parameter.

Hope this helps.
 
V

Vadym Stetsyak

Hello, John!

J> Hi
J> I would like to get the path to the My Docuemnts Folder so I can list
J> all the files / folders in a TreeView.

J> Thanks John

Environment.GetFolderPath(SpecialFolder.MyDocuments);

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
S

Stoitcho Goutsev \(100\)

John,

Look at Environment.GetFolderPath with parameter
Environment.SpecialFolder.Personal

Look also at the rest of Environment.SpecialFolder values you may find one
that could be more appropriate
 
S

Stoitcho Goutsev \(100\)

John,

Just a little clarification.

SpecialFolder.MyDocuments is not defined in .NET 1.x. SpecialFolder.Personal
is defined in both .NET1.x and .NET 2.0.
Both of them has the same numeric value.
 
G

Guest

thanks you. I'll give it a try.

John

Nicholas Paldino said:
John,

Call the static GetFolderPath method on the Environment class. Pass the
value of SpecialFolder.MyDocuments as the parameter.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

John said:
Hi
I would like to get the path to the My Docuemnts Folder so I can list all
the files / folders in a TreeView.

Thanks John
 
G

Guest

Thanks for all the help. The
Environment.GetFolderPath(SpecialFolder.MyDocuments); did the trick.

John
 

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