ASP GetFile() - FileSystemObject This the tutorial/example asp script how to Get file properties.
ShotDev Focus:
- ASP & Get file properties.
Example
asp_filesystemobject_getfile.asp
<% Option Explicit %> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <% Dim objFSO,objFile Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.GetFile(Server.MapPath("MyFiles/shotdev.txt")) Response.write("<br>Create Date = " &objFile.DateCreated) Response.write("<br>Size = " &objFile.Size) Response.write("<br>Type = " &objFile.Type) Set objFile = Nothing Set objFSO = Nothing %> </body> </html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_filesystemobject_getfile.asp
Screenshot