Data Type: FileSystemObject object
A FileSystemObject object.
Data Type: String
The complete path to the folder.
Determines whether a given folder exists; the method returns
True if the Folder exists, and
False if not.
FolderSpec can’t contain
FolderSpec cannot include a
filename as well as a path. In other words, the entire
FolderSpec string can only include
drive and path information.
FolderSpec does not include
a drive specification, the current drive is assumed.
FolderSpec is interpreted as an
absolute path if it begins with a drive name and a path
separator, and it is interpreted as an absolute path on the
current drive if it begins with a path separator. Otherwise, it
is interpreted as a relative path.
If the user has adequate rights,
FolderSpec can be a network path or
share name. For example:
If FileSys.FolderExists("\\NTSERV1\d$\TestPath\") Then
Among its string manipulation methods, the Scripting Runtime library lacks one that will extract a complete path from a path and filename. The example provides the GetCompletePath function to perform this useful task, as well as to illustrate the use of the FolderExists method.
Function GetCompletePath(sPath) Dim oFS Dim sFileName, sPathName Dim lPos Set oFS = CreateObject("Scripting.FileSystemObject") ...