Hello all,
I have a problem and can't figure it out anymore.
Bin looking at this prob for like a day now.
I hope any of you can and want to help me.
I have below code and i want to change it so that it will delete the file "test.test" in a sub directory.
I don't know the name of the sub directory so it has to go true the sub directories and when it finds the "test.test" file
it needs to delete it.
The folder only has 2 sub directories. That is the only thing i know.
Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim path As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\test\" If System.IO.Directory.Exists(path) = True Then System.IO.Directory.Delete(path, True) Else msgbox("file isn't there") End If End Sub




Reply With Quote