node.js execfile child process

Srilalitha vishnubhotla
Srilalitha vishnubhotla used Ask the Experts™
execFile(script, (error1, stdout1, stderr1) => {
                        if (error1 || stderr1) {
                            logger.error("+++++++++++" + error1  );
                        if (stdout1) {

Open in new window

when the script is log/getdata.bat
'log'is not recognized as an internal or external command, Pls suggest
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Running on Windows? Then at least log\getdata.bat. Note that the command does not spawn a shell, so I would have started cmd.exe and have passed the script as an arg and set cwd to the required directory.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial