Reputation: 2866
string downloadArea = Environment.GetFolderPath((Environment.SpecialFolder.MyDocuments) + "\\My Personal Documents\\CVs");
I'm trying to get the path ends with .....\My Personal Documents\CVs
My Personal Documents and CVs are folders that reside under MyDocuments.
The above code gives me a compiler error that says:
The best overloaded method match for 'System.Environment.GetFolderPath(System.Environment.SpecialFolder)' has some invalid arguments
Another error:
Argument '1': cannot convert from 'string' to 'System.Environment.SpecialFolder'
Any help will be appreciated
Upvotes: 2
Views: 1480
Reputation: 29476
Get the special "My Documents" folder path first, then append your additional directories with Path.Combine
:
string myDocuments = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
string downloadArea = Path.Combine(myDocuments, "My Personal Documents", "CVs");
Upvotes: 3