The Regiment performed a similar task two years later at the Battle of Ramillies, preventing the Dutch and English from completely wiping out the army. The regiment lost thirty-eight officers and three hundred and twenty-six soldiers out of a total of eight hundred men. Because of the death of regimental Major O'Carroll, O'Shaughnessy was promoted to that rank with effect 4 July 1706, and in September to lieutenant-colonel. He and his men fought at Oudenaarde, Malplaquet and other engagements until the end of the war in 1714. In April 1721 he became a Brigadier and made Marechal de Camp in 1735. Though now in his sixties he continued to participate actively in battle till the years prior to his death. He was appointed commander of the garrison at Gravelines in 1743 but died two months later in January 1744.