ÄúµÄλÖãº
Ñ°ÃÎÍøÊ×Ò³
£¾
±à³ÌÀÖÔ°
£¾
VBScript
£¾
VBScript
objects
constants
operators
statements
functions
properties
methods
All Methods
FileSystemObject Object
METHOD: FileSystemObject.GetBaseName
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 = filesysGetBaseName("c:\DevGuru\website\VBScript.txt")
Response.Write (a)
%>
Output:
"VBScript"