<div dir="ltr">Hello <div>I'm using buildbot on Windows, I often need to move files about on the worker, so I have steps as follows</div><div><br></div><div><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px"><span class="gmail-kn" style="color:rgb(0,0,0);font-weight:bold">from</span><font color="#000000"> </font><span class="gmail-nn" style="color:rgb(85,85,85)">buildbot.plugins</span><font color="#000000"> </font><span class="gmail-kn" style="color:rgb(0,0,0);font-weight:bold">import</span><font color="#000000"> </font><span class="gmail-n" style="color:rgb(0,0,0)">steps</span><font color="#000000">

</font><span class="gmail-n" style="color:rgb(0,0,0)">f</span><span class="gmail-o" style="color:rgb(0,0,0);font-weight:bold">.</span><span class="gmail-n" style="color:rgb(0,0,0)">addStep</span><span class="gmail-p" style="color:rgb(0,0,0)">(</span><span class="gmail-n" style="color:rgb(0,0,0)">steps</span><span class="gmail-o" style="color:rgb(0,0,0);font-weight:bold">.</span><span class="gmail-n" style="color:rgb(0,0,0)">ShellCommand</span><span class="gmail-p" style="color:rgb(0,0,0)">(</span><span class="gmail-n" style="color:rgb(0,0,0)">command</span><span class="gmail-o" style="color:rgb(0,0,0);font-weight:bold">=</span><span class="gmail-p" style="color:rgb(0,0,0)">[</span><font color="#9900ff"><span class="gmail-s2" style="">"cmd.exe /k"</span><span class="gmail-p" style="">,</span> <span class="gmail-s2" style="">"copy Y:\sourcefile\j93n.exe Y:\dest\folder"</span></font><span class="gmail-p" style="color:rgb(0,0,0)">],</span><font color="#000000">
                             </font><span class="gmail-n" style="color:rgb(0,0,0)">workdir</span><span class="gmail-o" style="color:rgb(0,0,0);font-weight:bold">=</span><span class="gmail-s2" style="color:rgb(187,136,68)">"</span><span class="gmail-s2" style=""><font color="#9900ff">build/directory</font></span><span class="gmail-s2" style="color:rgb(187,136,68)">"</span><span class="gmail-p" style="color:rgb(0,0,0)">))</span></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px"><span class="gmail-p" style="color:rgb(0,0,0)"><br></span></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px"><span class="gmail-p" style="color:rgb(0,0,0)">This will use the Windows command prompt to copy the j93n.exe to the destination folder, when it all works the command returns 0</span></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px"><span class="gmail-p" style="color:rgb(0,0,0)">which is SUCCESS, sometimes the copy fails always because the file does not exist. But when the file copy fails, I get an error message</span></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px"><span class="gmail-p" style="color:rgb(0,0,0)">e.g "Copy FAILED" but the return code is also 0.</span></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px"><br></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px"><font color="#000000">Am I using the command in the wrong way?</font></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px"><font color="#000000">How can I get a non-zero return value when this copy command fails?</font></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px"><font color="#000000"><br></font></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px"><font color="#000000">Regards</font></pre></div></div>