+ 1

How to get the date of save or change of a file?

Further explanation in case title is not clear: Say, I have a file that I created on 7th December in 2020, 16:00. When you make changes on the file ( say, it is a text file ) that date above changes into the date when you make the changes at. Can I get that date and time through C# ?

7th Dec 2020, 1:08 PM
Mustafa K.
Mustafa K. - avatar
1 ответ
+ 3
File.GetLastWriteTime(“path”).ToString(“yyyy-MM-dd HH:mm”);
7th Dec 2020, 2:09 PM
Flash