Showing posts with label batch. Show all posts
Showing posts with label batch. Show all posts

Dec 19, 2020

[Windows] cmd command that open a new window to run another command

Using a batch file, at times we need to run more than 1 command in a separate window.

To run command in a separate window and close when done,
start cmd /c command

To run command in a separate window and leave it open when done,
start cmd /k command


Feb 5, 2012

batch file with command line arguments

to create batch file (j.bat),
echo off
javac %1.java
echo run?
pause
java %1

to run the batch file,
j calc
(%1 = calc)