File Search
Hi,
I use this code to find the last file.
Set fso = New Scripting.FileSystemObject
For Each ThisFile In fso.GetFolder(sICAPPathName).Files
If ThisFile.Name Like "ICAP_FPC*.*" Then
Call GetICAPDate
If LatestFile Is Nothing And dThisFilesDate < dLastFileDate Then
Set LatestFile = ThisFile
dLastUpdated = dThisFilesDate
ElseIf dThisFilesDate dLastUpdated _
And dThisFilesDate < dLastFileDate Then
Set LatestFile = ThisFile
dLastUpdated = dThisFilesDate
End If
End If
Next
I have to use a sub routine to interpret the date as the date can be in
several different formats. I would like to read the files in update order as
this gets them in file name order, how do I change it to do that.
Thanks MarkS
|