Hi,
Environment.GetFolderPath(Environment.SpecialFolder.Personal)
returns the path to My Documents.
Ken
-----------------
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 folder, but it
seems a bit inelegant.
Sorry, I should be more specific. I have the user pick the folder
where a database will be kept, defaulting to "My Documents\ProductX",
where ProductX is the name of my program. When FolderBrowserDialog is
used to have the user pick a folder, and they choose "My Documents",
it returns the physical address as the SelectedPath, not "My
Documents" which is what the user expects to see. So I don't want to
subsequently show the physical location, I want to show "My
Documents".
I check to see if the physical path returned begins with the physical
My Documents path, and then show it as My Documents to the user.
Nothing major, I've already written the trivial code to handle it but
it just seemed that there would be a built in function (oops, Shared
Class method) that would deal with the physical vs logical
implementation of the Special Folders.