Deuteronomy 20:14
14 rbut the women and the little ones, the livestock, and everything else in the city, all its spoil, you sshall take as plunder for yourselves. And tyou shall enjoy the spoil of your enemies, which the Lord your God has given you.
Joshua 8:2
2 And you shall do to Ai and its king as you did hto Jericho and its king. Only iits spoil and its livestock you shall take as plunder for yourselves. Lay an ambush against the city, behind it.”