I have a sub routine that counts the files in a folder and if the # is greater than 15 it deletes the earliest files (by datecreated) until the # is <= 15. The code worked great for about a month, and not I get a runtime erro '53', "File Not Found". The problem is that the file is there, I checked! Any ideas, suggestions, etc. The error occurs on this line "Set f = fso.GetFile(FileName)"

[vba]Sub Folder_Maintenance()
Dim fso As Object, ObjFiles As Object, _
Folder As Object, f As Object, indFile, _
Dir As String
Dim FileName As String, MinDC As Double
Dir = "R:\Capital Projects\Status Reports\Project Resource Management Form\Log Files"
Set fso = CreateObject("Scripting.FileSystemObject")
Set Folder = fso.getfolder(Dir)
Set ObjFiles = Folder.Files
While ObjFiles.Count > 15

For Each indFile In ObjFiles
MinDC = indFile.datecreated
FileName = indFile.Name
Exit For
Next

For Each indFile In ObjFiles
If indFile.datecreated < MinDC Then
MinDC = indFile.datecreated
FileName = indFile.Name
'MsgBox (MinDC)
'MsgBox (FileName)
Else
End If
Next
Dim a
Set f = fso.GetFile(FileName)
f.Delete

Wend
End Sub
[/vba]