yes u can for that use directory ctrl give the path to it then it will give u entire list of files apply mid$ function to filenames if it matches then open it
try it by ur self
Here is a piece of code i have written for it
Option Explicit
Dim fsys As New FileSystemObject
Dim txtstream As TextStream
Dim outstream As TextStream
Private Sub Command1_click()
Dim j As Integer
Dim masterfile(1100000) As String
Dim masterline As String
Dim iday As Integer
Dim mastercount As Integer
For iday = 1 To 7
mastercount = 0
For j = 0 To lstmarket.ListCount - 1
If lstmarket.Selected(j) = True Then
If Len(Trim(txtYear)) > 2 Or IsNumeric(Trim(txtYear)) = False Then
MsgBox "There should be a 2 digit number"
txtYear.Text = ""
txtYear.SetFocus
Exit Sub
End If
If Trim(txtweek) <= 9 And Len(Trim(txtweek)) < 2 Then
txtweek = "0" & Trim(txtweek)
End If
filename = lstmarket.List(j) & Trim(txtYear) & Trim(txtweek) & iday & ".txt"
MsgBox ("You have selected the following file" & filename)
End If
Next j
Next iday
If fsys.FileExists("C:\Rohit program\exercise\SWD\" & filename) = True Then
MsgBox ("The files are opened for manipulation")
Else
MsgBox ("File not found")
End If
*********** the main coding starts from here*************
Set outstream = fsys.OpenTextFile("c:\Masterfile.txt", ForWriting, True)
Set txtstream = fsys.OpenTextFile("C:\Rohit program\exercise\SWD\" & filename, ForReading)
Do Until txtstream.AtEndOfStream
masterline = txtstream.ReadLine
mastercount = mastercount + 1
masterfile(mastercount) = masterline
For mastercount = 1 To mastercount - 1
outstream.WriteLine (masterline)
Next mastercount
Loop
End Sub