Executing multiple statements in the command prompt

15 views (last 30 days)
Hello,
I would like to execute the following statements in the cmd prompt from Matlab.
1. First I would like to set the Visual Studio environment parameters. This I do with
dos(['%comspec% /k "' VisualStudio '" x86 >']) ..where VisualStudio is the path to the vcvarsall.bat
2. Then I would like to execute in the same dos prompt above the command
nmake /F makefile.nmake clean
3. Third step is
nmake /F makefile.nmake all
My problem is that after the first dos statement, the statement 2 gives 'nmake' is not recognized as an internal or external command, operable program or batch file.
I need to execute statements 2 and 3 in the same dos prompt. I tried writing a batch file but for some reason the batch file does not execute. After the statement 1 I get Microsoft VS environment set and the rest of the commands do not execute.
Could someone help me out.
Thanks a lot.
Regards
Deepak

Answers (1)

Walter Roberson
Walter Roberson on 28 Sep 2015

Categories

Find more on Debugging and Analysis in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!