Thanks I got it to work correctly now:
Code:
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
f.ShowDialog()
Catch ex As Exception
End Try
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim Files As String() = IO.Directory.GetFiles(f.SelectedPath + "\", "*.*", IO.SearchOption.AllDirectories)
Dim fil As String
For Each fil In Files
If System.IO.Path.GetExtension(fil) = "" Then
FileSystem.Rename(fil, fil & ".txt")
End If
Next
End Sub
End Class