warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\inetpub\Websites\DevGuru\www\includes\common.inc(1762) : eval()'d code on line 1.

VBScript » FileSystemObject » GetParentFolderName

Version: 2.0


Returns a string containing the name of the parent folder of the last file or folder in a specified 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.


dim filesys, a
Set filesys = CreateObject("Scripting.FileSystemObject")
a = filesys.GetParentFolderName("c:\DevGuru\website\VBScript.txt")
Response.Write (a)