W3Schools.com

ASP GetParentFolderName Method


FileSystemObject Object Reference Complete FileSystemObject Object Reference

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 Required. The path for the file or folder whose parent folder name is to be returned


Example

<%
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


FileSystemObject Object Reference Complete FileSystemObject Object Reference
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
Download XML Editor
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE