Automating QTP Test Automation Home Automation Articles Downloads QTP Gotchas Links Books Contact About Site Map
File Function - ExistsThis function checks to see if a file exists. If you find an error, or have a suggestion for improvement, Email me and I'll fix it. Download it Here (right-click and then save target as). (NOTE - you can just cut & paste from below, but the formatting will have multiple spaces instead of tabs).
'=========================================================================
Function zFile_Exists(sFileName) Dim oFso Set oFso = CreateObject("Scripting.FileSystemObject") If oFso.FileExists(sFileName) Then zFile_Exists = True Else zFile_Exists = False End If Set oFso = Nothing End Function '========================================================================= |