File.DateCreated

JScript3.0+Syntax

							file.DateCreated

Description

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

Example

Listing 9.52 shows how to use to DateCreated property.

Listing 9.52 Example of DateCreated
 <html> <BODY> <script language="JScript"> <!-- Hide // function gets the date of when the file "mytest.txt" was // created. function get() { var myObject, f, date; // Create an instance of the FileSystemObject myObject = new ActiveXObject("Scripting.FileSystemObject"); f = myObject.GetFile("c:\\mytest.txt"); // determine the date when the file was created. date = f.DateCreated; alert ("The date this file was created is: " + date); } //--> </script> Get the date that mytest.txt was created. <form ...

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.