ASP GetTempName Method
Last Updated :
03 Mar, 2021
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
Share your thoughts in the comments
Please Login to comment...