The ASP GetFolder Method is used for returning the Folder object corresponding to the folder for a specified path. It is an in-built method of the FileSysten Object.
Syntax:
FileSystemObject.GetFolder(path)
Parameter Values:
- Path:It is a required attribute. It specifies the path to a specified Folder.
Example 1: Below example illustrates the ASP GetFolder Method.
ASP
<% dim fs,f set fs=Server.CreateObject( "Scripting.FileSystemObject" )
set f=fs.GetFolder("d:\hello\") Response.Write( "The folder was last modified on: " )
Response.Write(f.DateLastModified) set f=nothing set fs=nothing %> |
Output:
The folder was last modified on 01/01/20 4:23:56 AM
Example 2:
ASP
<% dim fs,f set fs=Server.CreateObject( "Scripting.FileSystemObject" )
set f=fs.GetFolder( "C:\Folder1\A" )
Response.Write( "The folder was last modified on: " )
Response.Write(f.DateLastModified) set f=nothing set fs=nothing %> |
Output:
The folder was last modified on: 2/22/2021 1:18:50 PM