File.DateLastAccessed : File : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » File »

 

File.DateLastAccessed







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












<html>
    <BODY>
    <script language="JScript">
    <!--
    function get()
    {
        var myObject, f, date;
        myObject = new ActiveXObject("Scripting.FileSystemObject");
        f = myObject.GetFile("c:\test.txt");
        date = f.DateLastAccessed;
        alert ("The date this file was last accessed is: " + date);
    }
    //-->
    </script>
    Get the date that mytest.txt was last accessed.
    <form name="myForm">
    <INPUT type="Button" value="Get Date" onClick='get()'>
    </form>
    </BODY>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo MS JScript
» File