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

后端 未结 19 1012
伪装坚强ぢ
伪装坚强ぢ 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:19

    Well, you have two options: Piping, or just &:

    DIR /S & START FILE.TXT
    

    Or,

    tasklist | find "notepad.exe"
    

    Piping (|) is more for taking the output of one command, and putting it into another. And (&) is just saying run this, and that.

    0 讨论(0)
提交回复
热议问题