How to delete all file starting wit particular name in path [Resolved]

Posted by Oswaldlily under VB.NET on 4/9/2014 | Points: 10 | Views : 914 | Status : [Member] | Replies : 1
In a path i has File01.xml and File11.xml,File10.xml,File00.xml,File20.xml,File21.xml and so on.

Now i need to delete all files in this path which starts with name "File"..How to do this in vb.net




Responses

Posted by: Oswaldlily on: 4/9/2014 [Member] Starter | Points: 25

Up
0
Down

Resolved
I got it myself..thankyou

Dim di As DirectoryInfo = New DirectoryInfo("path")
Dim files As FileInfo() = di.GetFiles("*.xml")



Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response