' Arquivo ASP 01 (default.asp)
<html><title>.:: Código Fonte ::.</title>
<body>
<form action="filecriaarquivo.asp" method="post">
<table width="464" border="1" align="center">
<tr>
<td width="207"><div align="right">Nome do arquivo: </div></td>
<td width="241"><input name="arquivo" type="text" size="15" maxlength="15"></td>
</tr>
<tr>
<td colspan="2"><div align="center"><input type="submit" name="enviar"></div></td>
</tr>
</table>
</form>
</body>
</html>
' Arquivo ASP 02 (filecriaarquivo.asp)
<%
str_arquivo = Request.form("arquivo")
Set str_fso = CreateObject("scripting.FileSystemObject")
If (str_fso.FileExists("c:\" & str_arquivo &".txt")) Then
response.write "Este arquivo ja Existe !!!"
Else
Set userFile = str_fso.CreateTextFile("c:\" & str_arquivo &".txt")
Response.Write "Arquivo criado com sucesso !!!"
End If
%>