GibboK
GibboK

Reputation: 73908

Batch in Windows always stop at first command

I have the following batch (.bat) file for Command Prompt in Windows. The script runs but after the first command it stops. I have also tried adding && between command only first command is execute.

I need to runs every command in the .bat in order.. any ideas ho to fix it?

   :: task 1
    cd C:\buildscripts
    build.bat profile=C:\Projects\netventic\trunk\lib\test\test.profile.js

    :: task 2
    cd C:\build
    del /s *.uncompressed.js

    :: task 3
    cd C:\build
    copy C:\a.js C:\build\test\

Upvotes: 0

Views: 98

Answers (1)

npocmaka
npocmaka

Reputation: 57252

all you need is CALL :

    :: task 1
    cd C:\buildscripts
    CALL build.bat profile=C:\Projects\netventic\trunk\lib\test\test.profile.js

    :: task 2
    cd C:\build
    del /s *.uncompressed.js

    :: task 3
    cd C:\build
    copy C:\a.js C:\build\test\

Upvotes: 2

Related Questions