I am trying to read information from any TXT file in a folder. How can I use *.txt? Thanks
The Directory.GetFiles method lets you specify a search pattern: Code: For Each f As String In Directory.GetFiles("C:\Temp", "*.txt") ' do something with f MessageBox.Show(f) Next
For Each f As String In Directory.GetFiles("C:\Temp", "*.txt") ' do something with f MessageBox.Show(f) Next
Negative 0 Blog | RegEx | Encrypting UN/PW in Web.Config | Enabling ASP.Net on IIS 6 | Port Numbers | Creating GUIDs | Start->Run | Modifying the default class
Thanks, I did it this way and it worked too For Each foundfiles As String In My.Computer.FileSystem.GetFiles(Logfilefolder, FileIO.SearchOption.SearchTopLevelOnly
Forum Rules