ASP GetBaseName Method

Definition and Usage

The GetBaseName method returns the base name of the file or folder in the specified path.

Syntax:

FileSystemObject.GetBaseName(path)
parameter description
path required. The base name of the path returned by the file or folder.

instance

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

Output:

3dgarro