Mega Code Archive

 
Categories / VisualBasic Script / File Path
 

If a particular file exists, and False if not

Function FileExists(fname) As Boolean     With Application.FileSearch         .NewSearch         .Filename = fname         .Execute         If .FoundFiles.Count = 0 Then _           FileExists = False _           Else FileExists = True     End With End Function