I have a testt.bat file that contains:
echo abc
echo cba
When I open command prompt and enter testt.bat I receive output:
C:\>testt.bat
C:\>echo abc
abc
C:\>echo cba
cba
C:\>
The command prompt stays open waiting for me to enter more commands.
Problem: If I double click testt.bat I receive the same output but cmd exits immediately. I want to be able to keep the prompt and enter more commands.
So basically I want to integrate the "opening CMD" part into the batch file.
I've tried:
start cmd /k "echo abc" & "echo bca"
but it only executes the first part "echo abc" without the second part.
Edit: I managed to do it by creating a second batch file "TESTX.bat" that contains:
start testt.bat
Is there a way to do the same thing without needing to use 2 batch files?