简体   繁体   中英

Opening multiple bat files with one bat file

I have 3 folders:

  • Folder1
  • Folder2
  • Folder3

Each folder has its own start.bat (Folder1/Start.bat,etc..) I want to make a file, in the folder where the files are listed The file will open and run each .bat file in a separate window/command prompt So Folder1's bat file makes a new window and loads Then folder2. They wont all open in one window.

How would I do this? I got this:

cd C:\Users\Jackson\Desktop\MAIN FOLDER\Folder1
java -Xmx512M Start.bat

Even better would be if I could run multiple jars in there own windows with 1 .bat Like if I had

  • Folder1/Jar1.jar
  • Folder2/Jar2.jar
  • etc...

And I open each one in a seperate window (minecraft console stuff...)

If I'm confusing please tell me if you need me to explain it better. I prefer using the jar files directly instead of opening the bat files.

Use the START command with the /B option to suppress the new windows. eg NB the double quotes are technically an optional window title but it's better to provide them.

START /B "" Java.exe blabla2.jar
START /B "" Java.exe blabal2.jar
...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM