Dim objFSO As New FileSystemObject Dim objFolder As Folder Dim objFile As File Dim strPath as String strPath = "C:\Temp" Set objFolder = objFSO.GetFolder(strPath) For Each objFile In objFolder.Files If Right(objFile.ShortName, 3) = "TMP" Then ' Your code goes here .... ' Let's delete the file objFile.Delete End If Next Set objFSO = nothing Set objFolder = nothing Set objFile = nothingHTH, Igor