Syntax
filesystemobject.GetSpecialFolder(num)
The GetSpecialFolder() method gets the special folder object specified.
This method takes num as its only parameter, which represents one of the following values:
0 | Windows folder |
1 | System folder |
2 | Temporary folder |
<html>
<body>
<script language="JScript">
<!--
function get()
{
var myObject, name;
myObject = new ActiveXObject("Scripting.FileSystemObject");
name = myObject.GetSpecialFolder(2);
alert("The folder is a temporary folder" + name);
}
-->
</script>
Check to see if the folder "Temp" is a temporary folder.
<form name="myForm">
<input type="Button" value="Get Special Folder" onClick='get()'>
</form>
</body>
</html>