Is it there?
Sub CheckExistFile()
Set objFSO = CreateObject("Scripting.FileSystemObject")
strTestPath = "c:\temp\abc.txt "
If objFSO.FileExists(strTestPath) Then
MsgBox "Yes it exists"
Else
MsgBox "Sorry, it doesn't exist"
End If
End Sub
Steve Yandl
"MD" wrote in message
.. .
Good day all,
I'm looking for a simple code that checks if a file exists in a folder.
if c:\temp\abc.txt is there then
else exit sub
Regards
MD
|