Animesh
Animesh

Reputation: 21

How to open two notepad files together from a batch file?

This is a Batch file.

java -jar "C:\Users\Clustering.jar" > E:\distMatrix.txt
notepad E:\distMatrix.txt
notepad E:\dendrogram_output.txt

pause

I want to open both the notepad files together .... 'cause when distMatrix opens, dendrogram_output does not open until the previous one is closed! What should I do?

Upvotes: 2

Views: 16964

Answers (2)

ElektroStudios
ElektroStudios

Reputation: 20464

In this case that answer works, But sometimes you will need to use the "/B" parameter with "start" command to run a program in the "background" without wait to close the first.

Start /B program1.exe
Start /B program2.exe

Bye.

Upvotes: 0

Joey
Joey

Reputation: 354516

Use start:

start notepad E:\distMatrix.txt
start notepad E:\dendrogram_output.txt

Note that once you have an argument with spaces in it, you need to use

start "" notepad "E:\some file with spaces.txt"

Upvotes: 11

Related Questions