tags:

views:

23

answers:

1
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

+2  A: 

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");
Chris Schmich
@Timwi: thanks :)
Chris Schmich