GetTempName
ASP GetTempName 方法
GetTempName 方法返回一个随机产生的临时文件或文件夹。
语法
FileSystemObject.GetTempName
实例
<%
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)
%>
输出:
trb2007.tmp
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)
%>
输出:
trb2007.tmp