Search code examples
batch-filejasperserver

how to execute more than one commands in bat file?


I am trying to build jasperserver. I want to execute all those commands through bat file. I have created one bat file but when I execute it, it executes only first command.

@Echo Off
js-ant clean-config 
js-ant gen-config 
js-ant add-jdbc-driver 
js-ant build-pro 
js-ant create-js-db 
js-ant build-js-ddl-pro 
js-ant init-js-db-pro 
js-ant import-sample-data-pro

these are the content of bat file.. I am not sure what to do... I never created bat file :) Thanks..


Solution

  • I guess js-ant is a batch file itself. In that case you need to CALL it, otherwise the calling batch file is terminated automatically.

    This should work:

    @Echo Off
    call js-ant clean-config 
    call js-ant gen-config 
    call js-ant add-jdbc-driver 
    call js-ant build-pro 
    call js-ant create-js-db 
    call js-ant build-js-ddl-pro 
    call js-ant init-js-db-pro 
    call js-ant import-sample-data-pro