EmptyRecycleBin – Delete all files in the Recycle Bin

EmptyRecycleBin – Delete all files in the Recycle Bin

Private Declare Function SHEmptyRecycleBin Lib "shell32.dll" Alias _    "SHEmptyRecycleBinA" (ByVal hWnd As Long, ByVal pszRootPath As String, _    ByVal dwFlags As Long) As LongConst SHERB_NOCONFIRMATION = &H1Const SHERB_NOPROGRESSUI = &H2Const SHERB_NOSOUND = &H4' Empty all the files in the Recycle Bin.'' If RootPath is a null string, it affects the Recycle Bin ' of all drives. You can optionally turn off confirmation dialogs, ' progress dialog, and soundsSub EmptyRecycleBin(ByVal RootPath As String, Optional NoConfirmation As _    Boolean, Optional NoProgress As Boolean, Optional NoSound As Boolean)    Dim hWnd As Long, flags As Long    ' get the handle of the active window, or zero    On Error Resume Next    hWnd = Screen.ActiveForm.hWnd    ' add a colon and backslash, if missing    If Len(RootPath) > 0 And Mid$(RootPath, 2, 2) <> ":" Then        RootPath = Left$(RootPath, 1) & ":"    End If    ' build the flags argument    flags = (NoConfirmation And SHERB_NOCONFIRMATION) Or (NoProgress And _        SHERB_NOPROGRESSUI) Or (NoSound And SHERB_NOSOUND)    SHEmptyRecycleBin hWnd, RootPath, flagsEnd Sub

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved