I suppose you open a directory with a file listbox and then run through all the files examining them by date and taking out the ones don't want.
I found this on the internet...
VB Code:
Private Sub displayFileInfo(ByVal fileName As String)
Dim fso As New FileSystemObject
Dim fileSpec As File
Dim strInfo As String
Set fileSpec = fso.GetFile(fileName)
strInfo = fileSpec.Name & vbCrLf
strInfo = strInfo & "Created: "
strInfo = strInfo & fileSpec.DateCreated & vbCrLf
strInfo = strInfo & "Last Accessed: "
strInfo = strInfo & fileSpec.DateLastAccessed & vbCrLf
strInfo = strInfo & "Last Modified: "
strInfo = strInfo & fileSpec.DateLastModified
MsgBox strInfo, vbInformation, "File Information"
Set fileSpec = Nothing
End Sub
So you could do something like this. Fil is your filelistbox and List1 is wehre you put your desired files. You should be able to come up with a way to check the file dates against each other.
VB Code:
Dim fso As New FileSystemObject
Dim fileSpec As File
For i = 0 to Fil.ListCount - 1
Set fileSpec = fso.GetFile(Fil.List(i))
If fileSpec.DateLastModified {Comes after} strMyCutoffDate Then
List1.Additem (Fil.List(i))
End If
Next i