VB.NET Delete all file extensions in folder.
Posted on 2006-06-02
Does anyone know code that would delete all files in a folder when all you know is the file extension?
This doesn't work.
Dim path As String = "C:\TEMP\*.WCH"
Catch ex As Exception
I get an error about 'invalid characters'. I also tried Dim path As String = "C:\TEMP\%.WCH". That didn't throuw an error, but it didn't delete the file either.