How do I run two commands in one line in Windows CMD?

后端 未结 19 1120
伪装坚强ぢ
伪装坚强ぢ 2020-11-22 00:45

I want to run two commands in a Windows CMD console.

In Linux I would do it like this

touch thisfile ; ls -lstrh

How is it done on

19条回答
  •  长发绾君心
    2020-11-22 01:04

    With windows 10 you can also use scriptrunner:

    ScriptRunner.exe -appvscript demoA.cmd arg1 arg2 -appvscriptrunnerparameters -wait -timeout=30 -rollbackonerror -appvscript demoB.ps1 arg3 arg4 -appvscriptrunnerparameters -wait -timeout=30 -rollbackonerror
    

    it allows you to start few commands on one line you want you can run them consecutive or without waiting each other, you can put timeouts and rollback on error.

提交回复
热议问题