1. Exposition

What is the law that Moses commanded?

Joshua 1:7 (ESV)

7 Only be strong and very courageous, being careful to do according to all the law that Moses my servant commanded you. Do not turn from it to the right hand or to the left, that you may have good success wherever you go.

The reference to the law given by Moses is probably pointing specifically to some parts or the whole of the book of Deuteronomy (Deuteronomy 1:5, Deuteronomy 31:9–13). Deuteronomy spelled out principles for holy war by which Israel was to engage in battle (Deuteronomy 7:1–26, Deuteronomy 20:1–20, Deuteronomy 21:10–14, Deuteronomy 25:17–19).