473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

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 28667
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ken | last post by:
I currently have a set of documents in a directory that i need to list in a html table. Is there any way to generate the table with the documents listed instead of having to update the table...
0
by: Grant_S | last post by:
I need to identify the path to a users "My Document" folder where the user has a roaming profile and their "My Documents" folder is mapped to a network share as the H drive (specifically H:\\ -...
3
by: Mong | last post by:
Hi, I have an application which has several hard coded references to "C:\My Documents". Shortly our network setup will be changed so that a users My Documents folder will be on a mapped network...
2
by: SamSpade | last post by:
I'm looking at using a TreeView control and can see how to fill in MyComputer with directory and file names. But I have no idea of how to include things like My Documents and My Network Places ...
9
by: dgk | last post by:
Is there some built in way to know whether a physical folder path is 'My Documents" for a specific user? I can always use xxx.StartsWith to compare it to the enumeration returned by the Personal...
2
by: Dixie | last post by:
In a network situation, if you write files to the My Documents folder, would it go to a different folder for each person's logon? If so, how do I send a text file to My Documents with...
6
by: (PeteCresswell) | last post by:
User wants to go this route instead of storing pointers in the DB and the documents outside. Only time I tried it was with only MS Word docs - and that was a loooong time ago - and it seemed to...
4
by: Dennis C. Drumm | last post by:
How do I programmatically get the path for the windows shared documents folder which is also the all user's document folder. Thanks, Dennis
6
by: shantanu | last post by:
Hi All, I have a requirement to develop a search engine based on some search criteria that will search for the string or statement in all the documents uploaded in the website. The search result...
3
by: =?Utf-8?B?TGllbGE=?= | last post by:
I have a user who stores her documents on a different drive and when she attempts to open documents it auto defaults to My Documents instead of her other drive. Is there a way to change the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.