My Documents Folder

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
John,

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

Hope this helps.
 
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
 
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
 
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.
 
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
 
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

Back
Top