ÄúµÄλÖãº
Ñ°ÃÎÍøÊ×Ò³
£¾
±à³ÌÀÖÔ°
£¾
VBScript
£¾
VBScript
objects
constants
operators
statements
functions
properties
methods
All Methods
FileSystemObject Object
METHOD: FileSystemObject.GetFileName
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"