Is ther any way to execute javascript from a .bat file or embed the javascript in .bat file.
I need a javascript code to write/read to a file in a local folder.This
on Windows, in a batch file, try
cscript jsfile.js
Short answer: no.
Javascript (when run from a browser) can't access the client resources (this is by design, to avoid security risks).
You can use Javascript outside of the browser, to create scripts, but you should provide more details on what you are trying to do (and what Operative System you expect to run this on).
Also, check this page for more details.