Windows batch file && operator

Viewed 13183

In bash I can write this:

#!/bin/sh
ant debug && adb install -r bin/Rocher-debug.apk

But I have a similar windows batch file, and currently it does this:

ant debug
adb install -r bin/Rocher-debug.apk

So, if "ant debug" fails, it will still run "adb install," and that's not ideal. Do any of you guys know how to do an && equivalent in this situation?

I really have to sit down and properly learn windows scripting some day soon, since I'll be doing a lot of windows work in a few months. But for now a quick answer would be awesome :-)

2 Answers
Related