I want to get creation date, last modify date other details relating to files, and adding them to a datagridview. Currently I am getting the file information by using
Dim paths() As String = IO.Directory.GetFiles("mypath")
For Each sFile As String In paths
Dim fileNameOnly As String = Path.GetFileNameWithoutExtension(sFile)
This is how I would grab both the created date, and the last write time.
For each sfile as datetime.tostring in paths Dim fileCreatedDate As DateTime = File.GetCreationTime(paths) Dim fileLastWrite as DateTime = File.GetLastWriteTime(path) Next