ASP GetBaseName メソッド

定義と用法

GetBaseName メソッドは、指定されたパス内のファイルやフォルダーのベース名を返します。

语法:

FileSystemObject.GetBaseName(path)
パラメータ 説明
パス 必須です。そのベース名は、返されるファイルやフォルダーのパスに返されます。

インスタンス

<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
Response.Write(fs.GetBaseName("c:\winnt\cursors\3dgarro.cur"))
fs=nothingセット
%>

出力:

3dgarro