Automating QTP Test Automation Home Automation Articles Downloads QTP Gotchas Links Books Contact About Site Map
File Function - Folder ExistsThis function checks if a folder exists. 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_FolderExists(sFolder) 'This function checks to see if a folder exists 'Usage: 'If zFile_FolderExists(sFolder) Then 'Xxxxx 'End If Dim oFso Set oFso = CreateObject("Scripting.FileSystemObject") If oFso.FolderExists(sFolder) Then zFile_FolderExists = True Else zFile_FolderExists = False End If Set oFso = Nothing End Function '========================================================================= |