Run Command Prompt Commands

前端 未结 14 1973
暖寄归人
暖寄归人 2020-11-21 05:32

Is there any way to run command prompt commands from within a C# application? If so how would I do the following:

copy /b Image1.jpg + Archive.rar Image2.jp         


        
14条回答
  •  無奈伤痛
    2020-11-21 06:25

    You can do this using CliWrap in one line:

    var stdout = new Cli("cmd")
             .Execute("copy /b Image1.jpg + Archive.rar Image2.jpg")
             .StandardOutput;
    

提交回复
热议问题