Top54u's new flavor with added attractions !!!
Javascript FSO DateLastAccessed Property
by top54u.com on 12 Nov, 2008
Add to Stumble-Upon     Add to Mixx!     Add to Yahoo Buzz Favorites     Post to MySpace!     Add to Technorati Favorites     Add to Facebook Favorites     Add to Live Favorites     Add to Delicious Favorites     Add to Twitter

The DateLastAccessed property of Javascript FileSystemObject (FSO) associated with file object or folder object returns the combined result of date and time of a specified file or folder when it was last accessed. DateLastAccessed property is accessible through both types of objects i.e. file object as well as folder object that returns the date and time when it was last accessed. Javascript FSO GetFile method returns the File object that allows the access to DateLastAccessed property and GetFolder method returns the folder object that also supports this property.

 

Syntax for Javascript FSO DateLastAccessed Property

 

fileObj.DateLastAccessed

or

folderObj.DateLastAccessed

 

Both above syntaxes show the way of using the file object and folder object to access the DateLastAccessed property.

 

Examples of FSO DateLastAccessed Property

 

Example 1: File Object to get the value of DateLastAccessed Property

 

<script type="text/javascript">

// initialize ActiveXObject and create an object of Scripting.FileSystemObject.

var fso = new ActiveXObject("Scripting.FileSystemObject");

// object created for file object returned by GetFile method

var fileObj = fso.GetFile("C:\\Temp\\textFile.txt");

document.write("<b>File DateLastAccessed: </b>" + fileObj.DateLastAccessed);

document.write("<br />");

</script>

 

Output:

File DateLastAccessed: Tue Oct 7 02:53:27 EDT 2008

 

Example 2: Folder Object to get the value of DateLastAccessed Property

 

<script type="text/javascript">

// initialize ActiveXObject and create an object of Scripting.FileSystemObject.

var fso = new ActiveXObject("Scripting.FileSystemObject");

// object created for folder object returned by GetFolder method

var folderObj = fso.GetFolder("C:\\Temp\\myFolder");

document.write("<b>Folder DateLastAccessed: </b>" + folderObj.DateLastAccessed);

document.write("<br />");

</script>

 

 

Output:

Folder DateLastAccessed: Tue Oct 7 02:44:12 EDT 2008

Share it:
Add to Stumble-Upon     Add to Mixx!     Add to Yahoo Buzz Favorites     Post to MySpace!     Add to Technorati Favorites     Add to Facebook Favorites     Add to Live Favorites     Add to Delicious Favorites     Add to Twitter    email
Reddit:
   
Dzone:
   
Kickit:
Rate this article:

0 Responses to "Javascript FSO DateLastAccessed Property"


Leave a Reply

Name(Required)


Mail[will not be published](Required)


Website






OR Subscribe via Email: