public static void Main() { while (true) { try { string path = @"C:\Users\Administrator\Desktop\New folder"; //if (!File.Exists(path)) //{ // File.Create(path); //} //else //{ // File.SetLastWriteTime(path, DateTime.Now); //} DateTime dt = File.GetLastWriteTime(path); Console.WriteLine("the last time {0}", dt); //Console.ReadLine(); } catch (Exception e) { Console.WriteLine("The process failed: {0}", e.ToString()); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)