Bournemouth 2 Milton Keynes Dons FC 0
Irishman Foley, on loan from Aston Villa, has already been told by David O'Leary that he will not be retained at the end of the season because, at five feet four inches, he is too small to play in the Premiership.
But what he lacks in height he makes up for in skill, pace and industry.
And apart from scoring in the 36th minute with a high-class free-kick, he also made Cooke's goal with eight minutes remaining.
Foley's goal came after he had been fouled 25 yards out by Dean Lewington.
The free-kick squeezed just inside a post although goalkeeper Matt Baker managed to get a hand to the ball on its way into the net.
Andrew Surman almost added another with a header in the 50th minute which struck a post before Bournemouth's second, finished off by Cooke with a low right-foot shot after Foley had picked him out with a cross-field pass from the left.
But it was not by any means a one-sided match and MK Dons were left to regret a host of wasted opportunities.
Paul Mitchell was denied by a fine save from Gareth Stewart after six minutes, while the normally prolific Izale McLeod should have done better from close range on two occasions.
Baker was lucky in the 33rd minute when he raced from his area to foul Surman but referee Steve Dorr issued only a yellow card.
Baker twice made important saves to deny Bournemouth, holding on to a header from Steve Fletcher in the 64th minute and then getting down to hold a free-kick from the edge of the area taken by Cooke.