ok now i get this date time .. in this folder files is create ine very 2 seconds so when time delay form2 seconds to 5 mint then i want to show alert automatically that file not create how to do this
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());
}
}