In the following example, we create an instance of a FileSystemObject object and then instantiate the file object using the GetFile method. After that, we use the file object properties to get information about the specified file:
<%
Dim objFSO, objdrive
' Create a FileSystemObject instance
Set objFSO = Server.CreateObject ("Scripting.FileSystemObject")
' Using the ' GetFile method of FileSystemObject object, initialize a File object
Set objfile = Objfso.getfile ("C:est.txt")
' Retrieve information about the file
Response.Write "Name:" & objfile.name & "<br/>"
Response.Write "ShortName:" & objfile.shortname & "<br/>"
Response.Write "Size:" & objfile.size & "bytes <br/>"
Response.Write "Type:" & Objfile.type & "<br/>"
Response.Write "Path:" & Objfile.path & "<br/>"
Response.Write "ShortPath:" & Objfile.shortpath & "<br/>"
Response.Write "Created:" & objfile.datecreated & "<br/>"
Response.Write "LastModified:" & objfile.datelastmodified & "<br/><br/>"
%>