The GetFolder() method gets the specified folder object.
<html>
<body>
<script language="JScript">
<!--
function getfolder()
{
var myObject, afolder, date;
myObject = new ActiveXObject("Scripting.FileSystemObject");
afolder = myObject.GetFolder("c:\\tmp");
date = afolder.DateLastAccessed;
alert("The folder"+name+" is a temporary folder.");
}
-->
</script>
Get the date that the folder "tmp" was last accessed.
<form name="myForm">
<input type="Button" value="Get Folder Date" onClick='getfolder()'>
</form>
</body>
</html>