Sorry, take out Dir & "\" &.
Code:Dim Dir As String = "C:\Directory" Dim fileList As New List(Of String) fileList.AddRange(My.Computer.FileSystem.GetFiles(Dir)) For x As Integer = 0 To fileList.Count - 1 Dim theFile As String = fileList.Item(x) If My.Computer.FileSystem.GetFileInfo(theFile).Extension = ".dem1" Then My.Computer.FileSystem.DeleteFile(theFile) End If Next




button on their post and leave them a comment to let them know they did a good job
Reply With Quote