How can I run cmd /k with multiple commands?
C:\>cmd /k echo a&echo b
doesn't do it
C:\>cmd /k (echo a&echo b)
doesn't do it
I actually want to do it in a new cmd window so
C:\>start cmd /k echo a & echo b
ultimately, I want to launch a few cmd windows in specific directories with specific titles. so i'll write a bat file with lines start cmd /k cd c:\windows & title windows
e.t.c.
If I could just get cmd /k working with multiple commands then I should be able to do it, but I can't see how to get cmd /k working with multiple commands.
How do I run cmd /k with multiple commands?
Moderator: DosItHelp
Re: How do I run cmd /k with multiple commands?
cmd /k "echo a&echo b"
Re: How do I run cmd /k with multiple commands?
Did you read the CMD help. It will enlighten you.
Re: How do I run cmd /k with multiple commands?
thanks foxi that works