hi, wanna ask for help
In code below, I will get creation time and last write time of a root folder, but how do I want to get creation time and last write time of files inside root folder.
For example, in the root folder, I have 3 more text files, how to get the creation time, and last write time of that 3 text files using c#.
FileInfo fileInfo = new FileInfo(@"C:\ipub\root");
DateTime creationTime = fileInfo.CreationTime;
DateTime lastWriteTime = fileInfo.LastWriteTime;
DateTime lastAccessTime = fileInfo.LastAccessTime;
DateTime creationTime = fileInfo.CreationTime;
DateTime lastWriteTime = fileInfo.LastWriteTime;
DateTime lastAccessTime = fileInfo.LastAccessTime;
MessageBox.Show("Time create : " + creationTime);
MessageBox.Show("Time Edit : " + lastWriteTime);
MessageBox.Show("Time Edit : " + lastWriteTime);
help me
thank you
I'm using visual studio 2019, c#
Jenith ThakkarPosted Jul 13, 2020, 4:43 AM
DirectoryInfo info = new DirectoryInfo(@"C:\ipub\root");
Thank you
Posted Jul 13, 2020, 8:33 PM
Jenith ThakkarPosted Jul 13, 2020, 5:56 AM
It it works for you then please accept the answer so it will be helpful for me also
Thank you
Laxmidhar SahooPosted Jul 13, 2020, 5:06 AM