DIAdem Help

Method: FolderExists for FileSystemObject

  • Updated2024-09-12
  • 1 minute(s) read

Method: FolderExists for FileSystemObject

Checks whether a folder exists

bFolderExists = Object.FolderExists(FolderSpec)
ObjectFileSystemObject
Object with this method
FolderSpecString
Specifies the path of the folder.
bFolderExistsBoolean
If the folder exists, the value is True. If the folder does not exist, the value is False.

The following example checks whether a folder exists:

Function FolderStatus(sFolder)
  Dim fso, sOutput
  Set fso = CreateObject("Scripting.FileSystemObject")
  If (fso.FolderExists(sFolder)) Then
    sOutput = sFolder & " exists."
  Else
    sOutput = sFolder & " doesn't exist."
  End If
  FolderStatus = sOutput
End Function

Log in to get a better experience