Home All Groups Group Topic Archive Search About

Create a file in My Documents folder

Author
8 Jun 2006 12:57 PM
Li Pang
Hi,

I want to create a file in My Documents folder. How to get the folder path?

Thanks in advance

Author
8 Jun 2006 1:19 PM
Herfried K. Wagner [MVP]
"Li Pang" <LiP***@discussions.microsoft.com> schrieb:
> I want to create a file in My Documents folder. How to get the folder
> path?


\\\
Imports System
....
Dim s As String = _
    Environment.GetFolderPath(Environment.SpecialFolder.Personal)
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
9 Jun 2006 8:11 AM
Li Pang
Hi Herfried K. Wagner,

Thanks a lot. Additional question:
How to get the local language setting?

Thanks in advance

Show quoteHide quote
"Herfried K. Wagner [MVP]" wrote:

> "Li Pang" <LiP***@discussions.microsoft.com> schrieb:
> > I want to create a file in My Documents folder. How to get the folder
> > path?
>
>
> \\\
> Imports System
> ....
> Dim s As String = _
>     Environment.GetFolderPath(Environment.SpecialFolder.Personal)
> ///
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>
>
>
Author
9 Jun 2006 12:35 PM
zacks
Herfried K. Wagner [MVP] wrote:
> "Li Pang" <LiP***@discussions.microsoft.com> schrieb:
> > I want to create a file in My Documents folder. How to get the folder
> > path?
>
>
> \\\
> Imports System
> ...
> Dim s As String = _
>     Environment.GetFolderPath(Environment.SpecialFolder.Personal)
> ///

Interesting that there would be two special folders that point to the
same place, I always use:

Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)

Is there a situation where the two would point to different locations?