Cómo leer y escribir archivos de texto locales usando JS
//Leer archivo
var fso, f1, ts;
var ForReading = 1;
fso = new ActiveXObject(" Scripting.FileSystemObject");
ts = fso.OpenTextFile(document.all.attachFile.value/*Aquí está el nombre del archivo con todas las rutas*/, ForReading);
documento .all.mailbdy.value=ts.ReadAll();
ts.Close();
//Escribir archivo
var title = document. ("title").value;//Nombre del archivo
var fso=new ActiveXObject("Scripting.FileSystemObject");
var f=fso.CreateTextFile("C: / /"+title+".nc",true); //Puedes elegir el nombre del sufijo a voluntad
f.write(document.getElementById("babala").value);
f.Cerrar();