title: SCP command not working in karate project - it throws command error:cannot run program scp.exe: CreateProcess error=2
body: <p>I have tried Karate framework feature karate.fork to execute SCP command but it throws command error:</p>
  <blockquote>
  <p>[scp.exe, -r, -i, C:\Users\pcmoh.ssh\id_rsa, user@server:/data/volume1/, C:\Users\pcmoh\karatetestjavascript\test\features\api\output] - Cannot run program &quot;scp.exe&quot;: CreateProcess error=2, The system cannot find the file specified.</p>
  </blockquote>
  <p>But SCP command is working fine in command prompt and in powershell window separately.</p>
  <p>I could not resolve this issue.</p>
  <p>Operating System: Windows 10</p>
  <p>Code snippet - <strong>ISSUE-1</strong></p>
  <pre><code>* def command =
              &quot;&quot;&quot;
                  function(line) {
                  var proc = karate.fork({redirectErrorStream: false, useShell: true, line: line });
                  proc.waitSync();
                  karate.set('sysOut', proc.sysOut);
                  karate.set('sysErr', proc.sysErr);
                  karate.set('exitCode', proc.exitCode);
                }
              &quot;&quot;&quot;
         * command('scp -r -i C:\\Users\\pcmoh\\.ssh\\id_rsa user@&lt;server&gt;:/data/volume1/ C:\\Users\\pcmoh\\karatetestjavascript\\test\\features\\api\\output')
         * match sysOut contains 'volume1'
         * assert exitCode == 0
  </code></pre>