In a vbs, I have this sub to delete some files depending on the extension:

Code:
Sub DoDelete(TheFolder)

Dim TheFile
Dim FSO2

Set FSO2 = CreateObject("Scripting.FileSystemObject")

TheFile= TheFolder & "\*.xyz"

WScript.echo TheFile

On Error Resume next
FSO2.DeleteFile(TheFile), TRUE

Set FSO2 = Nothing

End Sub
WScript.echo TheFile tells me that TheFile is correct, it is something like this:
Q:\_X15\__KILLME Icons\*.xyz

But the FSO2.DeleteFile(TheFile), TRUE does not do anything.

Ideas?