All Methods
FileSystemObject Object
METHOD: FileSystemObject.GetParentFolderName
Implemented in version 2.0
object.
GetParentFolderName
(path)
Used to return a string containing the parent folder name of the last component in a supplied path. If no component matches the supplied path string the
GetParentFolderName
method will return an empty string.
Note that this method doesn't check the existance or the validity of the supplied path.
Code:
<%
dim filesys, a
Set filesys = CreateObject("Scripting.FileSystemObject")
a = filesys.GetParentFolderName("c:\DevGuru\website\VBScript.txt")
Response.Write (a)
%>
Output:
"website\"
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information