ASP - Añadir lineas a un fichero de texto con FSO

 
Vista:

Añadir lineas a un fichero de texto con FSO

Publicado por Santiago (6 intervenciones) el 18/01/2003 18:32:17
Hola gente: quiero añadir contenido a un fichero de texto mediante FSO, el problema es que cada vez que lo intento me reescribe tiôdo el archivo en vez de añadir el contenido al final. Utilizo esto:

set fs=Server.CreateObject("Scripting.FileSystemObject")
Set tex = fs.OpenTextFile("elarchivo.txt",2,true)
tex.WriteLine("Linea Nueva")
tex.Save("elarchivo.txt")
tex.Close
set fs=nothing
set tex=nothing
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder