清除bin和obj文件夹的内容并清理vss相关文件

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

Function DeleteSomeFiles(path)
    Dim file,folder,sfolder,fname,subfolder,files
    If Not objFSO.FolderExists(path) Then
        Msgbox "目标文件夹不存在!"
        Exit Function
    End If
    Set folder=objFSO.GetFolder(path)
    Set files=folder.files
    For Each file In files
        Dim ext
        ext=objFSO.GetExtensionName(file.name)
        If ext="scc" Or ext="vspscc" Or ext="vssscc" Then
            objFSO.DeleteFile path & "\" & file.name,True
        End If
    Next
    Set subfolder=folder.subfolders
    For Each sfolder In subfolder
	If sfolder.name="bin" Or sfolder.name="Bin" Or sfolder.name="obj" Or sfolder.name="PrecompiledWeb" Then
            objFSO.DeleteFolder path & "\" & sfolder.name,True
        Else
            DeleteSomeFiles path & "\" & sfolder.name
        End If
    Next
End Function

Dim objFSO
Set objFSO=CreateObject("Scripting.FileSystemObject")
Dim objShell,objFolder
Set objShell=Createobject("Shell.Application")
Set objFolder=objShell.BrowerFolder(0,"Choose Folder",0,0)
If Not objFolder Is Nothing then
    DeleteSomeFiles objFolder.Self.Path 'Left(WScript.ScriptFullName,Len(WScript.ScriptFullName)-Len(WScript.ScriptName)-1)
End If
Set objFolder=Nothing
Set objShell=Nothing
Set objFSO=Nothing