VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

DeleteFileEx Function

Ruturaaj  (4 Submissions)   Files/File Controls/Input/Output   Intermediate   Wed 3rd February 2021

This function can do following things ...
[1] Show default system confirmation Prompt to move File to Recycle Bin
[2] Move directly the selected File to Recycle Bin without any Prompt
[3] Show default system confirmation Prompt to remove File forever.
[4] Delete File forever without any prompt. (Same lile Kill function)

Returns
Returns Boolean value. True if task completed without any error , or else returns False on error.

API Declarations
Private Declare Function SHFileOperation Lib "shell32.dll" (lpFileOp As SHFILEOPSTRUCT) As Long
Private Const FO_DELETE = &H3
Private Const FOF_ALLOWUNDO = &H40
Private Const FOF_NOCONFIRMATION = &H10
Private Type SHFILEOPSTRUCT
hwnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAnyOperationsAborted As Long
hNameMappings As Long
lpszProgressTitle As String
End Type

Rate DeleteFileEx Function (3(3 Vote))
DeleteFileEx Function.bas

DeleteFileEx Function Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters