I have a CSV file which is generated everyday I wanted to move that csv file into different folder with today's date.
my CSV file finaltest12.csv
This is my code:
if (System.IO.File.Exists(@"F:/Explor/final test/finaltest12.csv"))
{
String Todaysdate=DateTime.Now.ToString("dd-MMM-yyyy");
if(!Directory.Exists("I:\\test\\final test\\snaps\\"+Todaysdate)
{
Directory.CreateDirectory("I:\\test\\final test\\snaps\\"+Todaysdate);
}
}