ASP GetBaseName 方法

GetBaseName 方法返回指定路徑中的檔或檔夾的基準名稱。
語法
FileSystemObject.GetBaseName(path)
參數 | 描述 |
---|---|
path | 必需的。需被返回基準名稱的檔或檔夾的路徑。 |
實例
<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
Response.Write(fs.GetBaseName("c:\winnt\cursors\3dgarro.cur"))
set fs=nothing
%>
輸出:
3dgarro
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
Response.Write(fs.GetBaseName("c:\winnt\cursors\3dgarro.cur"))
set fs=nothing
%>
輸出:
3dgarro
