It determines whether or not a specified folder exists.
Syntax: fso.FolderExists (folderspec)
fso: (Required) The name of a FileSystemObject object previously instantiated.
folderspec: (Required) The name of the folder whose existence is to be determined. A complete path specification (either absolute or relative) must be provided if the folder isn't expected to exist in the current folder.
Set fso=createobject("Scripting.FileSystemObject") 'The Folder to check the existence. folderpath="D:qtp" If fso.FolderExists(folderpath) then msgbox "Folder Exists" Else Msgbox "Folder doesnot Exist" End If Set fso=nothing