G
graphicsxp
Hi,
How can I open all the files in a directory, which names match a
particular string ?
Say I have a string like 'a file name to find' and I want to find and
open all the files of a given directory, which name contains that
string.
Here is how I open the file of a directory. How can it be modified to
find open only the right files?
Imports System.IO
Sub Dir(Optional ByVal sDirectory As String = ".")
Dim sFiles() As String
Dim i As Integer
sFiles = Directory.GetFileSystemEntries(sDirectory)
For i = 0 To sFiles.GetUpperBound(0)
Console.WriteLine(sFiles(i))
Next
End Sub
Thanks
How can I open all the files in a directory, which names match a
particular string ?
Say I have a string like 'a file name to find' and I want to find and
open all the files of a given directory, which name contains that
string.
Here is how I open the file of a directory. How can it be modified to
find open only the right files?
Imports System.IO
Sub Dir(Optional ByVal sDirectory As String = ".")
Dim sFiles() As String
Dim i As Integer
sFiles = Directory.GetFileSystemEntries(sDirectory)
For i = 0 To sFiles.GetUpperBound(0)
Console.WriteLine(sFiles(i))
Next
End Sub
Thanks