Run Command Prompt Commands

前端 未结 14 1903
暖寄归人
暖寄归人 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:15

    you can use simply write the code in a .bat format extension ,the code of the batch file :

    c:/ copy /b Image1.jpg + Archive.rar Image2.jpg

    use this c# code :

    Process.Start("file_name.bat")

提交回复
热议问题