Problem running liquibase commands in bat file

I created a cmd file with these 3 commands, but only the first is executed…

liquibase --outputFile=test_snapshot.json snapshot --url=jdbc:postgresql://

liquibase diffChangeLog --url=jdbc:postgresql:// --referenceUrl=offline:postgresql?snapshot=test_snapshot.json

liquibase --url=jdbc:postgresql:// update

and other two rows are not executed even if the first command didn’t fail
Why ?


Hi @dubhe,

While this is really not a Liquibase question, I was able to find this post that shows how to run multiple commands in a Windows CMD file.

It looks like using the call statement before the liquibase command might be your answer (as shown below).

Your cmd file:

call command1    
call command2
call commandx

Let me know if this helps.



With “Call” now it works. Thanks