..
The method of the FileSystemObject object GetExtensionName returns the file extension specified in the argument. The only required parameter is the path of the file you want to locate the extension. Here's an example:
Dim fs, fileext
'I create a FileSystemObject instance dell'offetto
Set fs = Server.CreateObject ("Scripting.FileSystemObject")
'Retrieve the file extension
fileext fs.GetExtensionName = ("c: \ www \ mysite \ index.html")
Response.Write (fileext)
'I cleaned
Set fs = Nothing
The output will be generated:
html
| |
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 €. |