Skip to content
Related Articles

Related Articles

ASP GetFile Method
  • Last Updated : 02 Mar, 2021

The GetFile Method in ASP is used to return the File object corresponding to the file in a specified path. It is a predefined method of the FileSystem Object. 

Syntax:

FileSystemObject.GetFile(path) 

Parameter Values:

path: It is a required attribute. It specifies the path for the File. 

Example Code: Below code demonstrates the ASP GetFile Method.

ASP




<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("d:\sudo\hello.html")
Response.Write("The file was last modified on: ")
Response.Write(f.DateLastModified)
set f=nothing
set fs=nothing
%>

Output 

The file was last modified on 01/01/20 4:23:56 AM
My Personal Notes arrow_drop_up
Recommended Articles
Page :