Features
      Ask DevGuru
      ASP Resources
      Find the Bug
      Knowledge Base
      Links
      Tips of the Week
      Tutorials
  Products
      dgCalendar
      dgCharge New!
      dgChart New!
      dgFileUpload
      dgReport New!
      dgSort
      dgTree
  Site
      Authoring
      Coming Soon
      DevGuru Resume
      Link to Us
      Merchandise
      Sponsorships
      Testimonials
      What's New
  Technologies
      ADO 2.6
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      Transact-SQL Syntax
      VBScript
      WML
      WMLScript
      WSH
      XML DOM

              











METHOD:  FileSystemObject.GetBaseName

Implemented in version 2.0
 
object.GetBaseName(path)

This method allows us to get the base name of a file or folder in the specified path. The returned string contains only the base name of the file, without any extension.

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")
filesys.CreateTextFile "c:\DevGuru\website\VBScript.txt", True
a = filesys.GetBaseName("c:\DevGuru\website\VBScript.txt")
Response.Write (a)
%>
 
Output:
"VBScript"


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information