Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Explicit
- Function FileDelete(Filename As String) As String
- Dim fso As New FileSystemObject
- On Error Resume Next
- Err.Clear
- Call fso.DeleteFile(Filename)
- On Error GoTo 0
- If Err.Number <> 0 Then
- FileDelete = "Error: " & Err.Number & " " & Err.Description
- End If
- FileDelete = "Deleted."
- End Function
- Function FileExists(Filename As String)
- Dim fso As New FileSystemObject
- FileExists = fso.FileExists(Filename)
- End Function
- Function FileSize(Filename As String) As Long
- Dim fso As New FileSystemObject
- Dim f As File
- Set f = fso.GetFile(Filename)
- FileSize = f.Size
- End Function
Add Comment
Please, Sign In to add comment