473,466 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do I find retrieve the "My Documents" qualified path?


Is there a way via C# to programmatically retrieve the full path name
to folders like "My Documents" ??

I'm seeing examples with the use of Shell32 stuff I believe,

SHGetSpecialFolderLocation

and I have no knowledge nor experience using such stuff. I've seen
some examples pertaining to these special folders but it's all Greek
to me and I'm sure somebody here could explain it 100 times quicker
and clearer in a fraction of the wording.

Thanks for any help...

MsJ
Nov 16 '05 #1
6 13243
The System.Environment.SpecialFolder defines a set of special folders, like
My Documents,
which is represented as System.Environment.SpecialFolder.Personal.

string path =
System.Environment.GetFolderPath(System.Environmen t.SpecialFolder.Personal);
Console.WriteLine(path);
Console.Read();

--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"JuLiE Dxer" <Ms*****@verizon.net> wrote in message
news:9q********************************@4ax.com...

Is there a way via C# to programmatically retrieve the full path name
to folders like "My Documents" ??

I'm seeing examples with the use of Shell32 stuff I believe,

SHGetSpecialFolderLocation

and I have no knowledge nor experience using such stuff. I've seen
some examples pertaining to these special folders but it's all Greek
to me and I'm sure somebody here could explain it 100 times quicker
and clearer in a fraction of the wording.

Thanks for any help...

MsJ

Nov 16 '05 #2
On Wed, 9 Feb 2005 10:39:52 +0100, "Dennis Myrén" <de****@oslokb.no>
wrote:
The System.Environment.SpecialFolder defines a set of special folders, like
My Documents,
which is represented as System.Environment.SpecialFolder.Personal.

string path =
System.Environment.GetFolderPath(System.Environme nt.SpecialFolder.Personal);
Console.WriteLine(path);
Console.Read();


Thanks a bunch..

I just stumbled across a similar post in this group back in 2002 via
google groups. Thank goodness you posted this, though. I was just
about to give up on the google search !

System.Environment.GetFolderPath(System.Environmen t.SpecialFolder.Personal))
tusen tak Dennis fra Norge? hhehe

mange tak ingen
Nov 16 '05 #3
Where are you from ?

--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"JuLiE Dxer" <Ms*****@verizon.net> wrote in message
news:k9********************************@4ax.com...
On Wed, 9 Feb 2005 10:39:52 +0100, "Dennis Myrén" <de****@oslokb.no>
wrote:
The System.Environment.SpecialFolder defines a set of special folders,
like
My Documents,
which is represented as System.Environment.SpecialFolder.Personal.

string path =
System.Environment.GetFolderPath(System.Environm ent.SpecialFolder.Personal);
Console.WriteLine(path);
Console.Read();


Thanks a bunch..

I just stumbled across a similar post in this group back in 2002 via
google groups. Thank goodness you posted this, though. I was just
about to give up on the google search !

System.Environment.GetFolderPath(System.Environmen t.SpecialFolder.Personal))
tusen tak Dennis fra Norge? hhehe

mange tak ingen

Nov 16 '05 #4

I'm from Oregon :)

Jeg er fra Oregon :)

I know a little norsk, though.

jeg kan litte norsk her :)

On Wed, 9 Feb 2005 11:01:45 +0100, "Dennis Myrén" <de****@oslokb.no>
wrote:
Where are you from ?


Nov 16 '05 #5
That is cool, a guy from Oregon speaking norwegian!

I am swedish but live in Oslo.

--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"JuLiE Dxer" <Ms*****@verizon.net> wrote in message
news:jf********************************@4ax.com...

I'm from Oregon :)

Jeg er fra Oregon :)

I know a little norsk, though.

jeg kan litte norsk her :)

On Wed, 9 Feb 2005 11:01:45 +0100, "Dennis Myrén" <de****@oslokb.no>
wrote:
Where are you from ?

Nov 16 '05 #6
On Wed, 9 Feb 2005 16:16:05 +0100, "Dennis Myrén" <de****@oslokb.no>
wrote:
That is cool, a guy from Oregon speaking norwegian!

I am swedish but live in Oslo.

guy, no.. :)

I see,

Arbeider du inn Norge ?

jag talar inte svenska her :(
Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
by: Jim Hill | last post by:
I've done some Googling around on this and it seems like creating a here document is a bit tricky with Python. Trivial via triple-quoted strings if there's no need for variable interpolation but...
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:\\ -...
4
by: yaipa | last post by:
All, I've been asked by my boss to put an Icon in WinXP's "My Computer" for a utility we use around the shop. My tool of choice is of course Python and therefore what I am using to attempt my...
4
by: Ben | last post by:
Hello, I need to save some information into a text file. For this, I use : FileOpen(1, "c:\MyFile.txt", OpenMode.Output) For I = 0 To iCpt - 1 WriteLine(1,...
8
by: Tony Nelson | last post by:
On *nix, ~/foo refers to a file in a user's home directory. On MSWindows, users normally look at "My Documents" in their home directory. ISTM that a file that my program would put in ~/. on Linux...
4
by: Franky | last post by:
I know about GetModuleFileName but what I need is a similar call to get the folder "My Documents" Is there such a thing? Thanks
6
by: Garry | last post by:
Coming from VB6, I can detect the My Documents and Application Data directories using APIs. Does VB.NET have its own methods to return these values and if so, what are they. The vs.net help...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
1
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.