if rigth(name,4) = ".gif" then
response.write "รูปนี้เป็นรูป gif"
elseif rigth(name,4) = ".jpg" then
response.write "รูปนี้เป็นรูป jpg"
else
response.write "รูปนี้เป็นรูป อื่นๆ"
end if
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:test.txt")
Response.Write("The file test.txt is of type: ")
Response.Write(f.Type)
set f=nothing
set fs=nothing
%>