0

Actually i'm adapting a visual basic program into a web environment and a feature was to do saved tasks.

The task can have a system directory "C:\Users\Someone\DatabaseImport.txt", and automatically gets that file and proceeds doing something. Is there any way in javascript to get a file from the system without the user doing anything?

Musty
  • 1
  • 3

1 Answers1

1

It depends on what you mean by 'in Javascript'. If you mean in a browser-based script, then no. However, Node.JS is server side JS, and you'll be able to do it there.

https://nodejs.org/api/fs.html

Conan
  • 670
  • 7
  • 12
  • Javascript in the user-side, jquery. I mean a file from the user system directory. – Musty Nov 03 '16 at 16:15
  • it's difficult to definitively answer this without knowing what the use case of your application will be: is it a utility for you to use? you can probably make something work. is it an application for a number of end users across different browsers/OSes? i would be inclined to say no. you can read more here: http://stackoverflow.com/questions/371875/local-file-access-with-javascript – Conan Nov 03 '16 at 18:51