Creating a hard copy of files listed in a folder

  • Thread starter Thread starter Jim J
  • Start date Start date
J

Jim J

All,
I would like to create a hard copy of all the .txt files
listed in "C:\Files\work". I need to open up all of these
files, (approx. 100 files are in this directory) one at a
time and do a search for a certain string. I can do all
the search stuff, I just don't know how to create the
list.

Thanks,
Jim
 
Here is a sample function that will debug print the file names. It could be
modified to append the names to a table or whatever.

Function GetFileNames(pstrFind As String)
Dim strFile As String
strFile = Dir(pstrFind)

Do Until Len(strFile) = 0
Debug.Print strFile
strFile = Dir()
Loop
End Function
 
Back
Top