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.GetFileName

Implemented in version 2.0
 
object.GetFileName(path)

This method is used to return the name of the last file or folder of the supplied path. If the supplied path string doesn't end with the specified file or folder the GetFileName 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")
filesys.CreateTextFile "c:\DevGuru\website\VBScript.txt", True
a = filesysGetFileName("c:\DevGuru\website\VBScript.txt")
Response.Write (a)
%>

 
Output:
"txt"


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