I want to add a timestamp to filenames as files are created but most of the DateTime methods I\'ve tried output something with spaces and slashes. For instance:
You can make a path for your file as bellow:
string path = "fileName-"+DateTime.Now.ToString("yyyy-dd-M--HH-mm-ss") + ".txt";