title: Executing FART.exe (find and replace text) commands on remote server through SSH
body: <p>I'm executing a batch file on a remote server from our build server (Jenkins) through SSH. The batch file uses <code>fart.exe</code> commands to find and replace text. I have placed the <code>fart.exe</code> in <code>C:\Windows\System32</code> and I'm invoking it as <code>C:\windows\system32\fart.exe</code> in the batch file.</p>
  
  <p>The command works perfectly fine oin the remote server, but when invoking through SSH I get an error in the Jenkins log as: </p>
  
  <blockquote>
  <pre><code>'"C:\windows\system32\fart.exe"' is not recognized as internal or external command.
  </code></pre>
  </blockquote>
  
  <p>This is the only error I'm getting and the other commands successfully execute in the batch script. Both of the servers are Windows Server 2012 R2.</p>
  
  <p>I tried adding the path to system variable but it didn't work. </p>
  
  <p>This is how the Fart.exe is used in the batch script.</p>
  
  <blockquote>
  <pre><code>for /R "%BACKUP_SOURCE%" %%G in (%ConfigFile%) do (
  "C:\windows\system32\fart.exe" "%%G" %PlaceHolder% %AppPath%
  </code></pre>
    
    <p>)</p>
    
    <h2>Invoking From Jenkins</h2>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/wqxTD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wqxTD.png" alt="Invoking From Jenkins SSH"></a>
  I don't think the way i invoke the batch script do matter, because it is done trough the Jenkins SSH plugin. The batch script get invoked successfully. The error i get is from when executing the Fart.exe</p>
  
  <p>I tried invoking a different command of an exe located in the same path, and that is successfully invoked. so i guess the issue is isolated to FART.EXE.</p>