August 1999
Intermediate to advanced
1488 pages
72h 53m
English
filesystemobject.GetParentFolderName(foldername)
The GetParentFolderName() method is used to get the name of the parent folder for a specified file or folder. This method takes foldername as its only parameter, which represents the path for the name of the subfolder.
Listing 9.89 shows how to get the name for the parent folder.
<html> <body> <script language="JScript"> <!-- Hide function getparent() { var myObject, name; // Creates an instance of the FileSystemObject myObject = new ActiveXObject("Scripting.FileSystemObject"); name = myObject.GetParentFolderName("c:\\tmp\\subfolder"); alert("The parent folder name ... |
Read now
Unlock full access