ASP GetParentFolderName Method
Definition and Usage
The GetParentFolderName method returns the name of the parent folder of the last component in the specified path.
Syntax:
FileSystemObject.GetParentFolderName(path)
Parameter | Description |
---|---|
path | It is required. It needs to return the path of the file or folder in its parent folder. |
Instance
<% dim fs,p set fs=Server.CreateObject("Scripting.FileSystemObject") p=fs.GetParentFolderName("c:\winnt\cursors\3dgarro.cur") Response.Write(p) set fs=nothing %>
Output:
c:\winnt\cursors