DIAdem Help

Method: GetParentFolderName for FileSystemObject

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

Method: GetParentFolderName for FileSystemObject

Returns the name of the superordinate folder for a file or a folder.

sGetParentFolderName = Object.GetParentFolderName(Path)
ObjectFileSystemObject
Object with this method
PathString
Specifies the path of the folder or the file, of which DIAdem specifies the superordinate folder. The path must neither correspond with an existing folder nor with an existing file.
sGetParentFolderNameString
Receives the name of the superordinate folder. If no superordinate folder exists, DIAdem returns an empty string.

The following example returns the name of the superordinate folder.

Function ParentName(sDriveSpec)
  Dim fso
  Set fso = CreateObject("Scripting.FileSystemObject")
  ParentName = fso.GetParentFolderName(sDriveSpec)
End Function

See Also

Objects Overview

Log in to get a better experience