The Messenger of Allah ﷺ said, "Set out in the name of Allah, by Allah, and upon the religion of the Messenger of Allah. Do not kill a frail old man, a child, a young one, or a woman. Do not steal from the spoils. Gather your war booty together, set things right, and act with excellence, for Allah loves those who act with excellence."
حدثنا عثمان بن أبي شيبة حدثنا يحيى بن آدم وعبيد الله بن موسى عن حسن بن صالح عن خالد بن الفزر
أن رسول الله ﷺ قال انطلقوا باسم الله وبالله وعلى ملة رسول الله ولا تقتلوا شيخا فانيا ولا طفلا ولا صغيرا ولا امرأة ولا تغلوا وضموا غنائمكم وأصلحوا وأحسنوا إن الله يحب المحسنين
Its isnad is daif.It was narrated by Ibn Abu Shayba (12/382, 383) from Yahya bin Adam.Khalid bin al-Fizr: no one besides Ibn Hibban rated him reliable, and Ibn Main said, "He is not up to much."