The GetTempName() method gets a randomly generated temporary file or folder.
<html> <body> <script language="JScript"> <!-- function get() { var myObject, name; myObject = new ActiveXObject("Scripting.FileSystemObject"); name = myObject.GetTempName(); alert("The temp file name is: " + name); } --> </script> Get a temp file. <form name="myForm"> <input type="Button" value="Get Temp Name" onClick='get()'> </form> </body> </html>