..
The method of the FileSystemObject object GetBaseName returns the basename of the file or folder in the path specified.
This method requires only one parameter, the path (path) of the resource you want to get the basename.
Example:
Dim fs, bname
'I create an instance of the FileSystemObject
Set fs = Server.CreateObject ("Scripting.FileSystemObject")
'Retrieve the basename
fs.GetBaseName bname = ("c: \ www \ site \ tramonto.jpg")
'Print to video
Response.Write (bname)
'I cleaned
Set fs = Nothing
The output will be produced:
sunset
| |
ASP (Advanced)
Full course for creating dynamic Web sites. From 39 €. |
| |
ASP Zero (Ebook)
Learning Microsoft ASP and VBScript from scratch. At only 29 €. |
| |
ASP and Access (Ebook)
Managing a MS Access database with ASP. At only 29 €. |