Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

[RESOLVED] Special folder enumeration returning odd value

$
0
0
I'm trying to create an xml file, however whenever I set the path name it returns Personal\login.xml instead of the mydocuments path. Currently this is what I'm using:

Code:

path = IO.Path.Combine(Environment.SpecialFolder.MyDocuments.ToString, "login.xml")
IO.File.Create(path)

I also tried:

Code:

path = Environment.SpecialFolder.MyDocuments.ToString & "\login.xml"
but the same: Personal\login.xml gets returned. A little more detail, I'm using Win7 64-Bit.

Edit - I asked the question a bit to early. I found the solution:

Code:

path = IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "login.xml")

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>