Open In App

ASP GetTempName Method

Last Updated : 03 Mar, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

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

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads