Multipe Post Build Commands in Visual Studio 2012

258
Views
1
Answers

I am trying to call few commands in the Post Build event Command, but ony the first command is always executed. The remaining commands never gets executed.
Here is how I define the commands in Post- build event command line
C:\MyBatchFile.bat
C
:\MySecondBatchFile.bat
C
:\MyThirdBatchFile.bat
C
:\MyFourthBatchFile.bat
C
:\MyFifthBatchFile.bat

Any idea why?

edit | flag
William Patrick
Asked on: Oct 23, 2013 at 8:04PM

1 Answers

171
0
171

If you run multiple batch files in the Post Build event command line you should use "Call" in the command instead of using the batch file directly. If you dont use "Call" only the first command will execute and rest of the commands wil be ignored.

Instead of c:\MyBatchFile.bat
Use: call c:\MyBatchFile.bat

So your commands in Post- build event command line should be

Call C:\MyBatchFile.bat
Call C:\MySecondBatchFile.bat
Call C:\MyThirdBatchFile.bat
Call C:\MyFourthBatchFile.bat
Call C:\MyFifthBatchFile.bat

edit | flag
Mad Maddy
Answered on: Oct 23, 2013 at 8:11PM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags