FileSystemObject.GetTempName()

JScript3.0+Syntax

							filesystemobject.GetTempName()
						

Description

The GetTempName() method is used to get a randomly generated temporary file or folder.

Example

Listing 9.91 shows how the GetTempName() method is used. An instance of the FileSystemObject is created and then used to get the name of a randomly generated temporary file.

Listing 9.91 Example of GetTempName()
 <html> <body> <script language="JScript"> <!-- Hide function get() { var myObject, name; // Create an instance of the FileSystemObject myObject = new ActiveXObject("Scripting.FileSystemObject"); // Get the name of a temporary file name = myObject.GetTempName(); alert("The temp file name is: " + name); } // End Hide --> </script> Get a temp file. ...

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.