Вот еще один вариант для VBS, работает... Только показывает анимацию удаления. Примеры выше, к сожалению, уже не достал, попробую позже.
Код:
Function vFn_File_Recycle (vFilePath)
'Sends the file 'vFilePath' to the recycle bin without any delete confirmation. Returns 0 for no
'error, else returns the Err.Number.
'---------------------------------------------------------------------------------------------------
On Error Resume Next
'VERIFY FILE EXISTS
Set f_ObjFSO = CreateObject("Scripting.FileSystemObject")
If Not f_ObjFSO.FileExists(vFilePath) Then vExists = 0 Else vExists = 1
'CONTINUE IF FILE EXISTS
If vExists = 1 Then
'BACKUP CURRENT USER RECYCLE BIN SETTINGS
Set f_ObjReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
f_ObjReg.GetBinaryValue &H80000001, "Software\Microsoft\Windows\CurrentVersion\Explorer", "ShellState", vStateArr
vBackupState = vStateArr
vStateArr(4) = 39
f_ObjReg.SetBinaryValue &H80000001, "Software\Microsoft\Windows\CurrentVersion\Explorer", "ShellState", vStateArr
'INVOTE SHELL APPLICATION DELETE COMMAND
Set f_ObjShell = CreateObject("Shell.Application").NameSpace(0).ParseName(vFilePath).InvokeVerb("delete")
'RESTORE USER RECYCLE BIN SETTINGS
f_ObjReg.SetBinaryValue &H80000001, "Software\Microsoft\Windows\CurrentVersion\Explorer", "ShellState", vBackupState
End If
'CHECK FOR ERRORS AND CLOSE THE FUNCTION
If Err.Number <> 0 Then vFn_File_Recycle = 0 Else vFn_File_Recycle = Err.Number
On Error Goto 0
End Function