Support Forums

Full Version: Help??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
OK I am making SMNN Program V7.

But I want to add this Feature.
Code:
If File.Exists("C:\file.txt") Then
            My.Computer.FileSystem.DeleteFile("file.txt")
            Form2.Show()
            Me.Close()
        End If
End Sub

But its not working???
FIXED IT THANKS ANYWAY
My.Computer.FileSystem.DeleteFile("C:\file.txt")
you need to put the directory where the file that you want to delete is present,for example,your file.txt is saved in c: you need to change ("file.txt") into ("C:\file.txt")