difficult starting cmd prompt with execution of two commands
Posted: 20 May 2018 07:21
I am having difficulty starting cmd prompt with execution of two commands
this works fine (though is just for one command)
but this, with two commands, fails.. it closes immediately.
I tried adding a pause to get a better grasp of what was happening, but then I got another error
So I can't really see what's going on and how to do it
this works fine (though is just for one command)
Code: Select all
C:\>start cmd /k echo abc
but this, with two commands, fails.. it closes immediately.
Code: Select all
C:\>start cmd /k (echo abc & echo def)
Code: Select all
C:\>start cmd /k (echo abc & echo def & pause)
def
'pause)' is not recognized as an internal or external command,operable program or batch file.
C:\>start cmd /k ((echo abc) & (echo def) & (pause))
) was unexpected at this time.
C:\>