Set oWSH = CreateObject("WScript.Shell") Set oFSO = CreateObject("Scripting.FileSystemObject") Function ScriptPath ScriptPath = oFSO.GetParentFolderName(WScript.ScriptFullName) & "\" End Function Sub Sleep(x) Start = cint(second(time)) i = 0 Do i = i + 1 Loop While cint(second(time)) < Start + cint(x) End Sub Set fEBin = oFSO.CreateTextFile(ScriptPath & "Tmp_EBin.vbs",2) fEBin.writeline "Set oFSO = CreateObject(""Scripting.FileSystemObject"")" fEBin.writeline "Set oShell = CreateObject(""Shell.Application"")" fEBin.writeline "Set oFolder = oFSO.GetFolder(""C:\RECYCLER"")" fEBin.writeline "If (Not oFolder Is Nothing) Then" fEBin.writeline " For Each oFldr In oFolder.SubFolders" fEBin.writeline " Set oNS = oShell.NameSpace(oFldr.Path)" fEBin.writeline " If (Not oFolder Is Nothing) Then" fEBin.writeline " oNS.Self.InvokeVerb(""Empty Recycle &Bin"")" fEBin.writeline " Set oNS = Nothing" fEBin.writeline " Exit For" fEBin.writeline " End If" fEBin.writeline " Next" fEBin.writeline " Set oFolder = Nothing" fEBin.writeline "End if" fEBin.writeline "Set oFSO = Nothing" fEBin.writeline "Set oShell = Nothing" fEBin.close iReturn = oWSH.Run ("""" & ScriptPath & "Tmp_EBin.vbs""", 0, False) Sleep 2 'MsgBox iReturn iReturn = oWSH.AppActivate("Confirm Multiple File Delete") 'MsgBox iReturn If iReturn = "False" Then iReturn = oWSH.AppActivate("Confirm File Delete") If iReturn = "True" Then oWSH.SendKeys("{ENTER}") '* Delete temp file oFSO.DeleteFile ScriptPath & "Tmp_EBin.vbs" Set oWSH = Nothing Set oFSO = Nothing