Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

182
Vistas
Replacement for ActiveXObject("Scripting.FileSystemObject");

Refactoring old javascript code, what is an effective replacement for the below ActiveX code? Just having the ability to write a local file.

function WriteToFile(bufObj, fileName) {
 var fileObj;
 fileObj = new ActiveXObject("Scripting.FileSystemObject");
 fileObj = fileObj.OpenTextFile(fileName, ForWriting, true, TristateMixed);
 fileObj.Write(bufObj);
 fileObj.Close();
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You don't have that ability in a modern browser. (unless someone is crazy enough to still allow ActiveX controls - which no one does anymore).

the local file system is 100% HANDS off!!!

If you allow this?

Then when you come to my site to look at a cute cat picture? Then I am going to rummage around - and up-load say a text file called "my passwords". Or how about I go rummage around and look for a file called my banking?

or grab all your emails?

In fact, your JavaScript cannot even SELECT or set a file when using the file-up-load. So, any kind of local file access is not allowed, and is out of the question.

If this was to be allowed, then no one would ever use nor trust the internet again!

It is a security hole far to large. Now perhaps this might be some internal "only" web site, and some kind of local file rights and access is to be allowed? That being the case? You have to continue to allow and setup the browser to allow ActiveX for that internal site - but this is a high risk adventure.

So, you don't have a replacement, since browsers are locked down from code even touching, knowing or having ANY knowledge of the client side folders. Beside, the user might be on their Android phone, or a iPad - and they have rather different file systems anyway (and they don't have support for ActiveX either).

So, modern browsers have ZERO ability, I repeat ZERO ability to see, touch, know about the existence of ANY local file - it simple not allowed. About the only way around this issue would be to find a browser that still supports and allows ActiveX - and they are far and few between these days.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda