Get and Set Directory Last Write Time Using VB.NET
In this article I describe how to get and set the last write time of directory in VB.Net.
Get and Set Directory Last Write TimeThe SetLastWriteTime and GetLastWriteTime methods are used to set and get the last write date and time of the specified directory. The following code snippet sets and gets the last write date and time of a directory.
Dim root As String = "C:\Temp"
' Get and Set Last Write time
Dim lastWriteTime As DateTime = Directory.GetLastWriteTime(root)