I am trying to run a batch file in Electron using a network path. The function I am using is:
function cpSixHundred() {
require('child_process').exec("file:\\\\LSC-SA-NAS1\\Departments\\Information Technology\\Software\\Zebra Label Printer Reset Counters", function(err, stdout, stderr) {
if (err) {
// Ooops.
// console.log(stderr);
return console.log(err);
}
// Done.
console.log(stdout);
});
}
The error I get is:
Error: Command failed: \\LSC-SA-NAS1\Departments\Information
Technology\Software\Zebra Label Printer Reset Counterstest.bat
'\\LSC-SA-NAS1\Departments\Information' is not recognized as an internal or
external command,
operable program or batch file.
I understand it does not like the space in the network path. I have tried many combinations of quotes and string concatenations, but still no luck.
Thank you in advance.