Hello,
I just want to insert today's date into backup files name. Codes are below;
-------------
string today = DateTime.Today.ToShortDateString().ToString();
string parametre1 = "/C mysqldump -u root -pcsi csfdb force_db_ci > backup_'"+today+"'_1.sql"; // now closing cmd window
Process islem = new Process();
islem.StartInfo.FileName = "C:\\Windows\\System32\\cmd.exe";
...
------------
How can I insert today's string into backup file's name?
Simple string question
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Sep 14, 2011, 4:32 AM EDT
I'd use '-' instead which should be allowed:
string today = DateTime.Today.ToString("MM-dd-yyyy");
yokzuRank #5,421 · 300 reputationPosted Sep 14, 2011, 4:00 AM EDT
...
string parametre1 = "/C mysqldump -u root -pcsi csfdb force_db_ci > backup.sql"; // now closing cmd window
...
deepender singla111 reputationPosted Sep 14, 2011, 4:37 AM EDT
yokzuRank #5,421 · 300 reputationPosted Sep 14, 2011, 4:40 AM EDT