利用.WriteLine方法:
<%
Set AFileSystemObject = CreateObject("Scripting.FileSystemObject")
Set ATextStream = AFileSystemObject.CreateTextFile("C:\mulu\test.txt",true)
ATextStream.WriteLine("#include <stdio.h>")
ATextStream.WriteLine
ATextStream.WriteLine("main()")
ATextStream.WriteLine
ATextStream.Write("{")
ATextStream.WriteLine
ATextStream.WriteLine("int i;")
ATextStream.WriteLine
ATextStream.WriteLine("int j;")
ATextStream.WriteLine
ATextStream.Write("}")
ATextStream.Close
%>