title: Run multiple windows commands from nodejs
body: <p>When my windows server receives a post request, I need it to execute a command:</p>
  
  <pre><code>cd D:\project
  git pull
  mvn clean compile
  cd target
  java -jar app.jar -argument
  </code></pre>
  
  <p>I wrote the code, but it does not work:</p>
  
  <pre><code>const nodeCmd = require('node-cmd')
  
  app.post((req, res) =&gt; {
    let command = `cd D:\project\my_project
                   git pull
                   mvn clean compile
                   cd target
                   java -jar app.jar ${req.body.arg}`;
    nodeCmd.get(command, (err, data, stderr) =&gt; {
      if(data) { 
       return res.json(data);
      }
      return err;
   });
  })
  </code></pre>
  
  <p>Here is the error message: </p>
  
  <pre><code>{ Error: Command failed: cd D:projectmy_project &amp;&amp; dir
  The system cannot find the path specified.
  
      at ChildProcess.exithandler (child_process.js:294:12)
      at ChildProcess.emit (events.js:198:13)
      at maybeClose (internal/child_process.js:982:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
    killed: false,
    code: 1,
    signal: null,
    cmd: 'cd D:Tempautobooker &amp;&amp; dir' }
  </code></pre>