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
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!
Last Updated :
02 Mar, 2021
Like Article
Save Article