October 27, 2000 - Probing the File Last Accessed Date | WebReference

October 27, 2000 - Probing the File Last Accessed Date

Yehuda Shiran October 27, 2000
Probing the File Last Accessed Date
Tips: October 2000

Yehuda Shiran, Ph.D.
Doc JavaScript

To find out a file's last accessed date, use the DateLastAccessed property of the File object. Here is a piece of script that will print the file's last accessed date:

<SCRIPT LANGUAGE="JavaScript">
<!--
  myActiveXObject = new ActiveXObject("Scripting.FileSystemObject");
  file = myActiveXObject.GetFile("c:\\test.txt");
  alert(file.DateLastAccessed);
// -->
</SCRIPT>

You will get an alert box like this: