"Automation server can't create object" error

admin

Administrator
Staff member
Hi all

I would like to know if it is possible to use JavaScript to write to a text file. I tried using FileSystemObject in JavaScript. However, it gives the following error : "Automation server can't create object". Does anyone know what is going wrong here?


function WriteToFile() {
var fso, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
s = fso.CreateFolder("C:\\test.txt", true);
s.writeline("This is a test");
s.Close();

}


Thanks a lot

David
 
Top