I want to create a file with date.
DateTime time_now = DateTime::UtcNow;
String^ time_str = time_now.UtcNow.ToString();
String^ strPath = "C:\\Users\\Documents\\VS\\MyProject\\" + fileName + time_str + ".prc";
FileStream^ fs = File::Create(strPath); // in this line I get notSupportedException
I debug the code and the file name is : myfile05.01.2012 12:37:1222.prc
I think the probles is “:”
How can I fix it?
Personally I would replace the “.” and “:” with “_” ;
strPath.Replace(".","_").Replace(":","_");