Date: 02-16-2022
Return to Index
Function NextModel() As String
created by gbSnippets
Local temp$, FilePath$, MatchFlag As Long
FilePath$ = PathName$(Path,STL.CFN)
StartOver:
temp$ = Dir$(FilePath$ + "*.*")
Do While Len(temp$)
If InStr(".stl.stla.stlb",LCase$(PathName$(Extn,temp$))) = 0 Then temp$ = Dir$(Next) : Iterate Do 'file not an STL file
If MatchFlag Then Function = FilePath$ + temp$ : Exit Function 'found the next file, so leave the function
If LCase$(FilePath$ + temp$) = LCase$(STL.CFN) Then MatchFlag = 1
temp$ = Dir$(Next)
Loop
GoTo StartOver:
End Function
http://www.garybeene.com/sw/gbsnippets.htm