File.DateLastAccessed

JScript3.0+Syntax

							file.DateLastAccessed

Description

The DateLastAccessed property is used to find out the last date that the file was accessed.

Example

Listing 9.53 shows how the DateLastAccessed property is used.

Listing 9.53 Example of DateLastAccessed
 <html> <BODY> <script language="JScript"> <!-- Hide // function determines the date of when the file was // last accessed. function get() { var myObject, f, date; // Create an instance of the FileSystemObject myObject = new ActiveXObject("Scripting.FileSystemObject"); f = myObject.GetFile("c:\\mytest.txt"); date = f.DateLastAccessed; // inform the user of the date when the file was last accessed. alert ("The date this file was last accessed is: " + date); } //--> ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.