OSIRIS Grandmaster Cheater
Reputation: 0
Joined: 27 Aug 2006 Posts: 654
|
Posted: Mon Mar 10, 2008 9:17 am Post subject: [VB2008 TUTORIAL] How to delete a file |
|
|
Where it says C:\testDelete.txt just change that to the file you want deleted. Be very careful with this as once the file is deleted you can't recover it.
| Code: |
Dim FileToDelete As String
FileToDelete = "C:\testDelete.txt"
If System.IO.File.Exists(FileToDelete) = True Then
System.IO.File.Delete(FileToDelete)
MsgBox("File Deleted")
End If
|
|
|