top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

how can we find last modification date of a file present inside a folder in visual basic

+5 votes
387 views
how can we find last modification date of a file present inside a folder in visual basic
posted Dec 16, 2013 by Neeraj Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

You can use the LastWriteTime or the LastWriteTimeUtc property to get or set the last time the file was modified. LastWriteTimeUtc displays the time in Coordinated Universal Time (UTC).

Dim infoReader As System.IO.FileInfo
infoReader = My.Computer.FileSystem.GetFileInfo("C:\testfile.txt")
MsgBox("File was last modified on " & infoReader.LastWriteTime)

answer Jan 13, 2014 by Atul Mishra
...