Create A text file

This example shows how to create a text file on your hard disk . Of course you could easily make this a URL as well . This is actually a common technique in good counters where the count is commonly stored in a seperate file using this you could create a valid file if one didnt already exist.

<%
Dim objFSO , myFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set myFile = objFSO.CreateTextFile("d:\mytestfile.txt ", True)
myFile.WriteLine("This is just some sample text. ")
myFile.WriteLine("more sample text")
myFile.Close
%>

 

 

Sponsors