Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











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

 
Output:
"VBScript.txt"


 


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