RemoveFile




Function RemoveFile(FilePathAndName As String) As Boolean
On Error Resume Next
'Rimuove un file dal drive.

'NON VIENE INSERITO SU RECYCLE BIN!

Err.Clear
RemoveFile = True
Kill FilePathAndName
If Err Then
MsgBox Err.Description
Err.Clear
RemoveFile = False
End If
End Function

'Es.


If RemoveFile ("c:\temp\test.txt") = False Then
MsgBox "File non cancellato."
End If















( removefile.html )- by Paolo Puglisi - Modifica del 17/12/2023