This is a very noble sentiment, and in the time of the Prophet, it can be applied. Warfare in those days consisted of armies meeting in the field, or perhaps the siege and sack of a city. There was no such thing as a missile or bullet, and the best stand-off weapon was the bow and arrow. Even with that, you could see who you were about to kill. Thus, each individual soldier could choose to follow this rule, and the result would be that the fighting men of an enemy are killed, while non-combatants, elderly, women/children/sick/disabled, could be spared.
War has changed. Intermingled with military assets are women and children. Stand-off weapons make it impossible to determine who is in the area about to be obliterated. A war cannot be executed with today's weapons without harming innocents. So how can it be reconciled?