Malik bin Hamzah bin Abi Usayd narrates from his father, and he from his grandfather (may Allah be pleased with him), that on the Day of Badr the Messenger of Allah (peace and blessings be upon him) said: "When they come close to you, shower them with arrows, and do not draw your swords until they are upon you."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18476