469,306 Members | 1,590 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,306 developers. It's quick & easy.

My Documents Folder

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
6 28348
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
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
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
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
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
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.

Similar topics

2 posts views Thread by SamSpade | last post: by
2 posts views Thread by Dixie | last post: by
4 posts views Thread by Dennis C. Drumm | last post: by
6 posts views Thread by shantanu | last post: by
3 posts views Thread by =?Utf-8?B?TGllbGE=?= | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.