Displaying a list of files by modified date.
Posted on 2007-10-04
I have the below code. I would like to have it not only display the file name and directory, but also the modified date. Each separated as below.
Filename vbtab directory vbtab modifieddate vbcrlf
Sub DirAndFilesViewer(ByVal dir As String, ByVal showFiles As Boolean)
Dim subdir As String
Dim fileNm As String
Dim File As String
If showFiles Then
For Each fileNm In Directory.GetFiles(dir)
File = File & (New String(fileNm & vbTab & vbCrLf))
' The funciton is called recuresively for each sub directory
For Each subdir In Directory.GetDirectories(dir)