there are a way to clean all file with vb?

Best regards.

i know the api function for this but i didn't know how to use it.

SHEmptyRecycleBin

Anyone know how to use this api function to clean recycle bin???

Try This Following Code :

private declare function SHEmptyRecycleBin Lib "shell32.dll" Alias "SHEmptyRecycleBinA" (ByVal hwnd As Long,ByVal pszRootPath As String,ByVal dwFlags As Long) As Long
Private Const SHERB_NORMAL = &H10
Private Const SHERB_NOCONFIRMATION = &H1
Private Const SHERB_NOPROGRESSUI = &H2
Private Const SHERB_NOSOUND = &H4
Private Const SHERB_NOALL = _
(SHERB_NOCONFIRMATION And _
SHERB_NOPROGRESSUI And SHERB_NOSOUND)

Dim RetVal As Long
Private Sub Command1_Click()
   Dim y as Integer
   y = MsgBox("Are u sure to clean up Recycle Bin ? ", vbYesNo, "Confirmation"
   If y = vbYes Then
      RetVal = SHEmptyRecycleBin(0&,vbNullString,&H1)
   MsgBox "Recycle Bin has been cleaned"
   End If
End Sub

Ok. Hope This Helps.

commented: Perfect :) +1
commented: Great coding..... +1
commented: Good +1

check this sample and give your feedback

regards
Shouvik

commented: Great :) +1

thx jx_man its working nice. :)
thanks Shouvik for your example program. :)

hi all..
how can i zip and unzip a file using SharpzipLib.Dll.
Can any one help me?.
Thanks in advance...

Ok. Happy coding friend :)

commented: i see :) +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.