[Mono-dev] excute linux command under mono C#
harmeet.singh at onebcg.com
Mon May 16 08:05:34 EDT 2011
I tried this solution for executing linux command from asp.net application.
It is not working for me. We just want to move files from one folder to
another. My code is
string cmd = "/bin/cp -rp /usr/local/lib/xsp/test/2.0/projectname/invoices/
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "bash"; //here
proc.StartInfo.Arguments ="-c ' " + cmd + " ' "; ////??????
proc.StartInfo.UseShellExecute = false; ///????
We cannot use File.Copy because destination folder is mounted with Amazon
S3. While copying files it shows error folder not found. We will have to
copy files using command line.
View this message in context: http://mono.1490590.n4.nabble.com/excute-linux-command-under-mono-C-tp1533563p3526039.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list