Coding in VB2008 with Net Framework 3.5 in Windows 7-32 bit.
The code:
TempUserPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments
Returns the string "C:\Users\Owner\Documents" but that folder is actually named "My Documents" (i.e., is "C:\Users\Owner\My Documents" in the Finder).
When I try to create a new folder called "Documents" in the Owner directory, Windows asks if I want to merge its contents with the My Documents folder. If I say yes, I am left with only the My Documents folder and none named "Documents".
Thus when I attempt to read or write a file to the TempUserPath location, I get an "access denied" error. This happens even after I manually change the name of the folder from "My Documents" to "Documents".
Does anyone know why Windows seems to equate the filename "Documents" with "My Documents" within the VB environment and how I might work around this problem?
My Documents & Documents in this case are the same. Use a different folder name.