Get Last Access Time Of Directory C#

102

Get Last Access Time Of Directory C# -

//get last access time
string lastAccessTimePath = @"C:\Users\Yogeshkumar Hadiya\Desktop\DirectoryHandling";
DateTime lastAccessTime = Directory.GetLastAccessTime(lastAccessTimePath);
Console.WriteLine("Directory last accessed at " + lastAccessTime.ToString("MM/dd/yyyy hh:mm tt"));

Comments

Submit
0 Comments