Jenkins does not interpret windows batch commands properly
<p>Hey guys I do have the following batch file/commands:</p>

<pre><code>setlocal enableextensions enabledelayedexpansion
IF EXIST C:\myapp (
set /p pid =&lt; C:\myapp\RUNNING_PID
echo !pid!
taskkill /PID !pid! /F
DEL RUNNING_PID
rmdir C:\myapp /s /q
)
endlocal
mkdir C:\myapp
xcopy /E "C:\Program Files  (x86)\Jenkins\workspace\myapp\target\universal\myappDist\myapp-1.0"  C:\myapp
start java.exe -Dpidfile.path=C:\myapp\RUNNING_PID -Dhttp.port=3000 -cp C:\myapp\lib\* play.core.server.NettyServer
</code></pre>

<p>However, Jenkins does not interpret it properly. It always tries to execute the following:</p>

<pre><code>setlocal enableextensions enabledelayedexpansion 
IF EXIST C:\myapp (
set /p pid = 0&lt;C:\myapp\RUNNING_PID  
echo !pid!  
taskkill /PID !pid! /F  
DEL RUNNING_PID  
rmdir C:\lexia /s /q 
) 
</code></pre>

<p>The remaining lines of code are interpreted again properly. I don't have any clue what's going on here.</p>

<p>Hope someone can give me a hint.</p>

<p>Thanks already in advance!</p>