I'm using a console application and C# to execute some AWS (S3) CLI commands. I thought I had it working, because most of the commands execute just fine. But the last command is sync, and it doesn't work. But I know the command itself is correct, because a copy-paste into a command line window works just fine. Below is what I have so far:
String commands = "echo echo & echo echo";
commands += " & aws s3 ls s3://bbbbbb";
commands += " & aws s3 sync C:\test\test2 s3://bbbbbb"; //this is the line that doesn't execute
//make this to use with a Process
ProcessStartInfo commandsToRun = new ProcessStartInfo("cmd", @"/c " + commands);
//make the Process and run it
Process process = new Process();
process.StartInfo = commandsToRun;
process.Start();
I don't have any errors or any clues as to what's going on, I just don't get output from the last command, and if I check with ls or a Cloudberry Explorer, I can see that nothing has happened. Can anybody tell me what's going on here? Thanks!
echocommands and thelswork just fine without them.