<div class="gmail_quote">Standard non-error exit code on linux is 0</div><div class="gmail_quote">If you get something else then an error as occured.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Are you sure that both path exists ?</div>

<div class="gmail_quote">Do you have read/write rights ?</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Wed, May 18, 2011 at 10:22 AM, <a href="mailto:harmeet.singh@onebcg.com">harmeet.singh@onebcg.com</a> <span dir="ltr">&lt;<a href="mailto:harmeet.singh@onebcg.com">harmeet.singh@onebcg.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

  
    
  
  <div bgcolor="#ffffff" text="#000000">
    <font face="Tahoma">Hi<br>
      <br>
      I tried the code. My code is <br>
      <br>
      protected void Button1_Click(object sender, EventArgs e)<br>
          {       <br>
              Label1.Text=Execute(&quot;/bin/cp&quot;,&quot; -rp
      /usr/local/lib/xsp/test/2.0/projectname/invoices/
      /usr/local/lib/xsp/test/2.0/projectname/testupload/&quot;).ToString();<div class="im"><br>
          }<br>
          internal int Execute(string exe, string args)<br>
          {<br>
              ProcessStartInfo oInfo = new ProcessStartInfo(exe, args);<br>
              oInfo.UseShellExecute = false;<br>
              oInfo.CreateNoWindow = true;<br>
      <br>
              oInfo.RedirectStandardOutput = true;<br>
              oInfo.RedirectStandardError = true;<br>
      <br>
             <br>
      <br></div><div class="im">
              Process proc = System.Diagnostics.Process.Start(oInfo);<br>
              proc.WaitForExit();       <br></div><div class="im">
              int exitCode = proc.ExitCode;<br>
              proc.Close();<br>
      <br>
              return exitCode;<br>
          }<br>
      <br>
      <br></div>
      Output returned is 1. But Files are not copied to destination
      folder. Any suggestions.<br>
      <br>
    </font>
    <div>
      <div style="margin:0px;padding:0px;width:100%;float:left;color:rgb(51, 51, 51);font-size:12px">
        Regards,<br>
        <br>
        Harmeet Singh<br>
        <div style="margin:0px;padding:0px;width:100%;float:left;color:rgb(102, 102, 102);font-size:11px">Software Engineer
          .NET<br>
          <div style="margin:0px;padding:0px;width:100%;float:left;color:rgb(51, 51, 51);font-size:11px">Ext: 3023<br>
            <br>
          </div>
          <div style="margin:0px;padding:0px;width:100%;float:left;color:rgb(102, 102, 102);font-size:11px">Phone AU:
            <a href="tel:%2B61%202%209114%206001" value="+61291146001" target="_blank">+61 2 9114 6001</a>    |    IN: <a href="tel:%2B91%20172%20424%208888" value="+911724248888" target="_blank">+91 172 424 8888</a>    |    UK: +44
            2070 99 88 50    |    US: <a href="tel:%2B1%20866%20420%209555" value="+18664209555" target="_blank">+1 866 420 9555</a><br>
          </div>
          <div style="margin:0px;padding:0px;width:100%;float:left;color:rgb(102, 102, 102);font-size:11px">Fax<span style="padding:0pt 0pt 0pt 16px">AU: +61 2 9114
              6002    |    IN: <a href="tel:%2B91%20172%20424%208889" value="+911724248889" target="_blank">+91 172 424 8889</a>    |    UK: +44 2070 99
              49 55    |    US: <a href="tel:%2B1%20480%20304%203080" value="+14803043080" target="_blank">+1 480 304 3080</a></span><br>
          </div>
          <div style="margin:0px;padding:5px;width:100%;float:left;color:rgb(102, 102, 102);font-size:11px"><a href="http://www.onebcg.com" target="_blank"><img alt="ONE BCG" border="0" height="50" width="100"></a></div>


          <div style="margin:0px;padding:0px;width:100%;float:left;color:rgb(111, 111, 111);font-size:10px">This
            message is for the designated recipient only and may contain
            privileged, proprietary, or otherwise private information.
            If you have received it in error, please notify the sender
            immediately and delete the original. Any other use of the
            email by you is prohibited.</div>
          <div style="margin:2px;padding:0px;width:100%;float:left;color:rgb(0, 128, 0);font-size:10px">Please
            consider the environment before printing this email<br>
            <br>
            <br>
          </div>
        </div>
      </div>
    </div><div><div></div><div class="h5">
    <br>
    On 5/17/2011 4:04 PM, nekresh wrote:
    </div></div><blockquote type="cite"><div><div></div><div class="h5">
      <pre>On Tue, May 17, 2011 at 12:03 PM, harmeets <a href="mailto:harmeet.singh@onebcg.com" target="_blank">&lt;harmeet.singh@onebcg.com&gt;</a> wrote:
</pre>
      <blockquote type="cite">
        <pre>Hi what will be exe and args here?
</pre>
      </blockquote>
      </div></div><pre><div><div></div><div class="h5">
With your command : /bin/cp -rp
/usr/local/lib/xsp/test/2.0/projectname/invoices/
/usr/local/lib/xsp/test/2.0/projectname/testupload/

The exe part will be &quot;/bin/cp&quot;
and the args part will be &quot;-rp
/usr/local/lib/xsp/test/2.0/projectname/invoices/
/usr/local/lib/xsp/test/2.0/</div></div>projectname/testupload/&quot;
_______________________________________________
Mono-devel-list mailing list
<div class="im"><a href="mailto:Mono-devel-list@lists.ximian.com" target="_blank">Mono-devel-list@lists.ximian.com</a>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a>

</div></pre>
    </blockquote>
  </div>

</blockquote></div><br>