File.DateCreated : File : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » File »

 

File.DateCreated







The DateCreated property is used to get the date in which the file was created.












<html>
    <BODY>
    <script language="JScript">
    <!--
    function get()
    {
      var myObject, f, date;
        myObject = new ActiveXObject("Scripting.FileSystemObject");
        f = myObject.GetFile("c:\mytest.txt");
        date = f.DateCreated;
        alert ("The date this file was created is: " + date);
    }
    //-->
    </script>
    Get the date that mytest.txt was created.
    <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