zzfive03
Programmer
- Jun 11, 2001
- 267
Good Morning.
I have a subroutine that connects to a virtural drive, and searches for .txt files. When It finds one, it will print it out on the page. The problme is the subroutine takes forever because it is sorting thru all kinds of other files. Is there a built in funciton (or just a more effecent way) to search for .txt (or *.anything). Here is my current procedure for doing this task:
For Each objFile in objSubFolder.Files
FExtBegPos = InStrRev(objFile.Name, "."
FExtTotal = len(objFile.Name)
FExt = Right(objFile.Name, FExtTotal - FExtBegPos)
If FExt = "FSZ" or FExt = "fsz" Then
do something
End If
Thanks for any adivce.
I have a subroutine that connects to a virtural drive, and searches for .txt files. When It finds one, it will print it out on the page. The problme is the subroutine takes forever because it is sorting thru all kinds of other files. Is there a built in funciton (or just a more effecent way) to search for .txt (or *.anything). Here is my current procedure for doing this task:
For Each objFile in objSubFolder.Files
FExtBegPos = InStrRev(objFile.Name, "."
FExtTotal = len(objFile.Name)
FExt = Right(objFile.Name, FExtTotal - FExtBegPos)
If FExt = "FSZ" or FExt = "fsz" Then
do something
End If
Thanks for any adivce.