<% Dim MLS MLS = Request.Querystring("MLS") if Request.Form("btndelete") = "Delete Note" then Dim strPath Dim objFSO Dim objFolder strPath = "../notes/" Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(Server.MapPath(strPath)) If objFSO.FileExists(Server.MapPath("../notes/" & MLS & ".txt" )) Then objFSO.deletefile(Server.MapPath("../notes/" & MLS & ".txt" )) end if Set objItem = Nothing Set objFolder = Nothing Set objFSO = Nothing Response.Redirect ("enternotesadminenter.asp") end if Set MyFileObj=Server.CreateObject("Scripting.FileSystemObject") Set MyOutStream = MyFileObj.CreateTextFile(Server.MapPath("../notes/" & MLS & ".txt" ), 1, 0) MyOutStream.Write(Request.Form("new")) MyOutStream.Close Response.Redirect ("enternotesadmin.asp?MLS=" & MLS) %>