Skip to content
Related Articles
Open in App
Not now

Related Articles

ASP GetTempName Method

Improve Article
Save Article
  • Last Updated : 03 Mar, 2021
Improve Article
Save Article

The ASP GetTempName Method is used for returning the randomly generated file or folder from the system.  It is an in-built method of the FileSystem Object. 

Syntax:

FileSystemObject.GetTempName  

Parameter Values: This method does not contain any parameter value. 

Example: Below code demonstrates the ASP GetTempName Method. 

PHP




<%
dim fs,tfolder,tname, tfile
Set fs=Server.CreateObject("Scripting.FileSystemObject")  
Set tfolder=fs.GetSpecialFolder(2)
tname=fs.GetTempName
Set tfile=tfolder.CreateTextFile(tname)  
Response.write (tfile)
%>

Output:

GFG2021.temp
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!