using System.IO;
StreamWriter SW = new StreamWriter(Application.StartupPath + @"/time.txt", true); SW.WriteLine(DateTime.Now); SW.Close();