VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Delete a File using DeleteFile API

by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 1st August 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Delete a File using DeleteFile API

Rate Delete a File using DeleteFile API



Private Sub Form_Load()
' Delete the file C:\karthik\waste.txt
Dim rtval As Long  ' return value
rtval = DeleteFile("C:\karthik\waste.txt")
If rtval = 1 Then
MsgBox "File deleted successfully."
Else
MsgBox "Error"
End If
End
End Sub


Download this snippet    Add to My Saved Code

Delete a File using DeleteFile API Comments

No comments have been posted about Delete a File using DeleteFile API. Why not be the first to post a comment about Delete a File using DeleteFile API.

Post your comment

Subject:
Message:
0/1000 characters