Mega Code Archive

 
Categories / JavaScript Tutorial / MS JScript
 

File DateLastModified

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