By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,262 Members | 2,664 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,262 IT Pros & Developers. It's quick & easy.

My Documents Folder

P: n/a
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
Feb 3 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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]
- mv*@spam.guard.caspershouse.com

"John" <Jo**@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
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

Feb 3 '06 #2

P: n/a
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.MyDocument s);

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Feb 3 '06 #3

P: n/a
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
--
HTH
Stoitcho Goutsev (100)

"John" <Jo**@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
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

Feb 3 '06 #4

P: n/a
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.
--

Stoitcho Goutsev (100)

"John" <Jo**@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
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

Feb 3 '06 #5

P: n/a
thanks you. I'll give it a try.

John

"Nicholas Paldino [.NET/C# MVP]" wrote:
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]
- mv*@spam.guard.caspershouse.com

"John" <Jo**@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
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


Feb 4 '06 #6

P: n/a
Thanks for all the help. The
Environment.GetFolderPath(SpecialFolder.MyDocument s); did the trick.

John

"John" wrote:
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

Feb 4 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.