FileWrite Statement:

The FileWrite statement allows writing to a file. The FileWrite statement has three required arguments: pathname, texttowrite, and overwrite. The first argument is pathname. Pathname must be the complete path to an already existing file. The second argument texttowrite is a string containing the text to add to the file. To add more than one line of text, use vbCrLf. The third argument is a boolean representing overwriting. If the overwrite argument is set to True, the complete contents of the file is replaced with texttowrite. If it is set to False, the texttowrite string is appended to the file's contents.

FileWrite pathname, texttowrite, overwrite
Example Usage:
 ' Overwrites the contents of File.txt with 2 lines of text.
FileWrite 	server.mappath("/New Folder/File.txt", _
		"line 1" & vbCrLf & "line 2" & vbCrLf, _

 ' Appends 2 lines of text to the the contents of File.txt.
FileWrite	server.mappath("/New Folder/File.txt", _
		"line 1" & vbCrLf & "line 2" & vbCrLf, _
ASP Source Code:
Private Sub FileWrite(byVal pathname, byVal strToWrite, byVal boolOverWrite)
	dim objFSO, objFile, boolErr, strErrDesc, lngWriteMethod
	On Error Resume Next
	Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
	if boolOverWrite then
		lngWriteMethod = 2
		lngWriteMethod = 8
	end if
	Set objFile = objFSO.OpenTextFile(pathname, lngWriteMethod, False)
	objFile.Write strToWrite
	If Err Then
		boolErr = True
		strErrDesc = Err.Description
	End If
	Set objFile = Nothing
	Set objFSO = Nothing
	On Error GoTo 0
	if boolErr then Err.Raise 5107, "FileWrite Statement", strErrDesc
End Sub