Linked Questions
10 questions linked to/from Why does only the first line of this Windows batch file execute but all three lines execute in a command shell?
890 votes
18 answers
1.2m views
How to run multiple .BAT files within a .BAT file
I'm trying to get my commit-build.bat to execute other .BAT files as part of our build process. Content of commit-build.bat: "msbuild.bat" "unit-tests.bat" "deploy.bat" This seems simple enough, but ...
38 votes
3 answers
27k views
Why does calling a nested batch file without prepending "call" to the line exit the parent batch file?
I understand how to call nested batch files from within a parent file using the call command, as there are plenty of resources on that: CALL CALL (SS64) Bat file termination However, I don't ...
2 votes
2 answers
6k views
bat script only runs first line?
When I copy/paste the lines below into a cmd window it executes without a problem. "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat" msbuild proj\projsln /p:Configuration=...
3 votes
2 answers
3k views
Bat script exits unexpectedly
I have the following bat script: @echo off set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_32 set JRE_HOME=C:\Program Files\Java\jdk1.6.0_32\jre set Path=%JAVA_HOME%\bin;%Path% cd C:\project mvn ...
3 votes
3 answers
997 views
.less compilation in batch for-loop ends batch script prematurely
I'm new to batch, but I figured out it would be a good way to compile the .less files for my website into .css before deploying it. Unfortunately, after I use a for loop in a batch file to find all ...
3 votes
1 answer
977 views
.bat Script Terminating Before AWS Auto Scaling Commands Executed
I am fairly new to Amazon Cloud Auto Scaling (and AWS all together). I am currently trying to write a .bat script that will automatically create a launch configuration and then an auto scaler. The ...
1 vote
1 answer
2k views
Windows batch file to install multiple perl modules - only the first line runs
I'm installing Bugzilla on Windows, and checksetup.pl asked me to install a bunch of modules by running ppm (Perl Package Manager) commands like so: C:\>ppm install TimeDate This runs correctly, ...
2 votes
4 answers
812 views
How to call SCons from a Windows Batch subroutine?
I am trying to write a .bat file that executes a few SCons commands, but I found that once the first executes, the bash closes without executing the others. So I made a sub-routine and use the CALL ...
0 votes
1 answer
285 views
Command Line Script Ends After Webpack CLI
I have a simple command script which looks like this: webpack --config dev.webpack.config.js consoleapp.exe param1 param2 I'm running it via Visual Studio (2019, Community) Task Runner. I can see ...
0 votes
2 answers
108 views
When i run the code below in a batch file, it will only execute the first line and does not close the command window
Originally did not have call in front of the command and the command window would not close, but read on the forum where that might make it work. Now the command window closes, but it doesn't copy the ...