vbs check if file exists code example
Example 1: vba check if file exists
Public Function IsFile(s)
IsFile = CreateObject("Scripting.FileSystemObject").FileExists(s)
End Function
Example 2: vbs check if file exists
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
If fso.FileExists("C:\myFolder\newFile.txt") Then
'Perform Code
End If