清理*.mp3:- Dim FSO, Mpath, File
- Mpath = CreateObject("Shell.Application").Namespace(&H20).Self.Path
- Set FSO = CreateObject("Scripting.FileSystemObject")
- For Each File In FSO.GetFolder(Mpath).Files
- If LCase(FSO.GetExtensionName(File)) = "mp3" Then
- FSO.DeleteFile File
- End If
- Next
- Set FSO = Nothing
- MsgBox "清理完毕!", , "ArdentMan友情提示"
复制代码
|