C
Cherry
I have written the following code to check did the
file "test.tmp" existence in c:\, however, I found that if
there is a file named "test111.tmp", the result return
is "Found".
How can I check the existence of "test.tmp" and return
false if there is file "test111.tmp"??
Public Sub MAIN()
With Application.FileSearch
.NewSearch
.LookIn = "C:\"
.SearchSubFolders = False
.FileName = "test.tmp"
.MatchTextExactly = True
If .Execute() > 0 Then
MsgBox "Found"
Else
MsgBox "Not Found"
End If
End With
End Sub
file "test.tmp" existence in c:\, however, I found that if
there is a file named "test111.tmp", the result return
is "Found".
How can I check the existence of "test.tmp" and return
false if there is file "test111.tmp"??
Public Sub MAIN()
With Application.FileSearch
.NewSearch
.LookIn = "C:\"
.SearchSubFolders = False
.FileName = "test.tmp"
.MatchTextExactly = True
If .Execute() > 0 Then
MsgBox "Found"
Else
MsgBox "Not Found"
End If
End With
End Sub