I am trying to run a script from windows powershell:
.\mongo.exe localhost:27017/test --quiet test.js
that calls mongoimport:
var c_env = 'dev';
if (c_env === "dev")
{
./mongoimport.exe -d noeldb -c order_notifications --file "D:\Utilities\mongodb\bin\mycollection.json";
}
I get the following error:
Tue May 29 09:47:00 SyntaxError: syntax error D:\Noel\Temp\test.js:5
failed to load: D:\Noel\Temp\test.js
Is it possible to do this?