I am trying to move Txt files from one folder to another but I keep getting an error message stating "illegal characters in path". I think it's because of the * in the file name but how do i change it to except it?


string sourceFile = @"C:\\new1\*.txt";
string destinationFile = @"C:\\new2\*.txt";

try putting this....

string sourceFile = @"C:\\new1\\*.txt";
string destinationFile = @"C:\\new2\\*.txt";

Thanks Mono,

I have already tried this but haven't had any luck. It's not liking the "*" symbol but not sure what I can change it for or define in the code...