Option Explicit
Dim FullFileName
FullFileName = Wscript.ScriptFullName
Dim CurrentPath
CurrentPath = Left(FullFileName,InstrRev(FullFileName,"\") -1)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Dim Folder,Files,SubFolder
Set Folder = fso.GetFolder(CurrentPath)
VisitAndDelete(Folder)
Function VisitAndDelete(path)
Dim fso
Dim objFolder,objSubFolder,objSubFolders,CurrentPath,objFiles
Set fso = CreateObject("scripting.filesystemobject")
Set objFolder = fso.GetFolder(path)
Set objSubFolders = objFolder.Subfolders
For Each objSubFolder In objSubFolders
CurrentPath = path + "\" + objSubFolder.Name
On Error Resume Next
fso.DeleteFile(CurrentPath & "\*.ncb")
fso.DeleteFile(CurrentPath & "\*.suo")
VisitAndDelete(CurrentPath)
Next
Set objFolder = Nothing
Set objSubFolders = Nothing
Set fso = Nothing
End Function