FileSystemObject.GetSpecialFolder()
JScript3.0+Syntax
filesystemobject.GetSpecialFolder(num)
Description
The GetSpecialFolder() method is used to get 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
Example
Listing 9.90 shows how the GetSpecialFolder() method is used to get the Temporary folder.
Listing 9.90 Example of GetSpecialFolder()
<html> <body> <script language="JScript"> <!-- Hide function get() { var myObject, name; // Creates an instance of the FileSystemObject myObject = new ActiveXObject("Scripting.FileSystemObject"); name = myObject.GetSpecialFolder(2); alert("The folder is a temporary folder" + ... |
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.