Pile served in the First World War and was involved in the retreat from Mons and was a Staff Captain with 1st Division before becoming a Brigade Major with 40th Division in 1916. In the closing stages of the War he became a General Staff Officer with 22nd Corps in France. After the war he was appointed a Brigade Major at Brighton and Shoreham District. He transferred to the Royal Tank Corps in 1923. In 1928 he became Commander of the 1st Experimental Mechanized Force and Assistant Director of Mechanisation at the War Office. He went to Egypt in 1932 as Commander of the Canal Brigade Mechanized Force. In 1937 he became General Officer Commanding 1st Anti Aircraft Division. Even before the war started, he foresaw the likely pressures on personnel and investigated whether women would be capable to taking a part in anti-aircraft batteries. He invited Caroline Haslett of the Women's Engineering Society to spend several weekends observing the work of a battery in Surrey and she advised him that women would certainly be able to do the work, as proved to be the case during the war. In 1939, at the start of the Second World War, he was made General Officer Commanding-in-Chief of Anti-Aircraft Command, a position he held throughout the war. He was the only British general to retain the same command throughout the entire war. After Dunkirk he issued a General Order telling his men that they were the only British troops still firing at the enemy. He was to tell the story after the war, in his official dispatch and in his book Ack-Ack: Britain's Defence against Air Attack during the Second World War. His plan for "Engagement of Long Range Rockets with AA Gunfire" was ready on 21 March 1945 but the plan was not used due to the danger of shells falling on Greater London. Pile was created a Knight Grand Cross of the Order of the Bath in the 1945 New Year Honours. After the War he became Director General of Housing with the Ministry of Works. He was also Colonel Commandant of the Royal Artillery from 1945 to 1952.
Personal life
In 1915 Pile married Vera Millicent Lloyd, with whom he had two sons, Frederick Devereux Pile and John Devereux Pile. In 1932 he married Hester Mary Melba Phillimore. In 1951, he married Molly Eveline Louise Mary Home. Pile's elder son, Frederick Pile, served as a major in the Royal Tank Regiment. He won the Military Cross during the British Army's advance into Germany in 1945. He was later promoted to colonel and succeeded to the baronetcy on his father's death in 1976.