tutorial pengembangan web terbaru
 

ASP Cara GetTempName


<Object Reference FileSystemObject Lengkap

Metode GetTempName mengembalikan file sementara yang dihasilkan secara acak atau folder.

Sintaksis

FileSystemObject.GetTempName

Contoh

<%
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:

trb2007.tmp

<Object Reference FileSystemObject Lengkap