Set fso = CreateObject("Scripting.FileSystemObject")
'指定文件夹
FileUrl = Script.GetAppPath()
Set f = fso.GetFolder(FileUrl)
For Each item In f.Files
'指定删除的文件类型
If LCase(Right(item.name, 4)) = ".dmp" Then
'MsgBox item.name
'拼接文件路径
NewFileUrl = FileUrl & item.name
fso.DeleteFile(NewFileUr)
End If
Next
Set f = Nothing
Set fso = Nothin