Empty Recycle Bin for a drive or all drives! You can optionally turn off confirmation dialogs, prog
Empty Recycle Bin for a drive or all drives! You can optionally turn off confirmation dialogs, progress dialog, and sounds.
API Declarations
' Deletes all files in the Recycle Bin for the specified
' drive.
' If drive be omitted, it affects the Recycle Bin of all
' drives. You can optionally turn off confirmation dialogs,
' progress dialog, and sounds.
Option Explicit
Private Declare Function SHEmptyRecycleBin Lib "shell32.dll" Alias "SHEmptyRecycleBinA" (ByVal HWnd As Long, ByVal pszRootPath As String, ByVal dwFlags As Long) As Long
Rate Empty Recycle Bin for a drive or all drives! You can optionally turn off confirmation dialogs, prog
(2(2 Vote))
Dim HWnd, Flags As Long
On Error Resume Next
HWnd = Screen.ActiveForm.HWnd
If Len(Drive) > 0 Then _
Drive = Left$(Drive, 1) & ":\"
Flags = (NoConfirmation And &H1) Or (NoProgress And &H2) Or (NoSound And &H4)
SHEmptyRecycleBin HWnd, Drive, Flags
End Sub
' Jahedsoft - The VB Source Code Site
' http://www.geocities.com/m_jahedbozorgan/
' [email protected]
Empty Recycle Bin for a drive or all drives! You can optionally turn off confirmation dialogs, prog Comments
No comments yet — be the first to post one!
Post a Comment