Peter Foley was the Deputy Police Commissioner of the GCPD in The Dark Knight Rises.
Peter Foley became Deputy Commissioner in the GCPD sometime after Harvey Dent was killed by Batman, and developed a strong disliking of Batman for his "murder". Eight years after the incident, Foley attended a party at Wayne Manor on Harvey Dent Day and talked to the congressmen Byron Gilly about Wayne's absence and Gordon's separation with his wife. When Gilly went missing and was then later located at a bar, Foley and Gordon led a SWAT team to investigate. There they found thugs working for Philip Stryver, an executive of the power-hungry corporation Daggett Enterprises, exchanging gunfire with the police with Gilly as their hostage
The police pursued the thugs who headed into the sewer, so Gordon went down there while Foley waited up top. Gordon was kidnapped in the sewer and later was rescued by John Blake. Gordon had been shot and was hospitalized, leaving Foley in charge of the police during his absence. Foley also dismissed Gordon's report of a masked man called Bane in the sewers and payed little attention to it. However, when Bane attacked the Gotham Stock Exchange and took a hand-full of hostages, Foley ordered all officers after the hostage takers, but upon Batman's return, he ordered all officers off duty or not to go after him at the expense of letting Bane get away. This pursuit failed, however, when Batman used the Bat to escape.
When Bane kidnapped the Wayne Enterprises board, Foley became a believer in the threat that Bane posed, so Gordon put him in charge of a massive operation to stop him using every single available police officer. However, during the operation, Blake informed him of a trap but was too late. A bomb went off and trapped all the officers underground. Foley and a few other cops were able avoid this and became part of a police underground resistance force with Blake and Gordon to fight Bane's rule on the city, which was sealed with the threat of a nuclear bomb that he turned the new Wayne Enterprises fusion reactor core.
A few months later, things started looking up when U.S. Special Forces led by Capt. Mark Jones arrived to help, but were soon killed by Bane and his men. Foley lost his nerve and gave up the fight, staying at home with his family. As the nuclear device was nearing detonation, Gordon went to Foley's home and pleaded for his help saying "I'm not asking you to walk down Grand in your dress blues", but Foley still refused to leave his house. He changed his mind when he saw a fire image of a bat above the bridge, signalling the return of the Batman, who had been exposed by Bane's earlier reading of Gordon's secret resignation letter as a hero and the scapegoat for Dent's crimes.
He led the GCPD attack -- in his "dress blues" -- facing several Tumblers and Bane's men. Although ordered to stand down with the threat of being fired upon, Foley continued to move foward followed by the many numbers of police officers and SWAT team forces. Just as the Tumblers were about to open fire, Batman arrived in the Bat and fired upon the Tumblers, saving Foley and the other police and SWAT officers. Encouraged by the arrival of Batman, Foley led the officers to Gotham City Hall, firing a Glock 17 and ordering them to advance forward. As Wayne Enterprises CEO Miranda Tate (unbeknownst to Foley to be Talia al Ghul) and Bane's second-in-command Barsad attempted to get into a tumbler, Foley picked up a fallen assault rifle and managed to shoot Barsad in the lower midsection, killing him. Safely inside the tumbler, Talia ordered for the shooting of everyone and Foley was then killed. His death was soon avenged, however, when Batman defeated Talia and she died as a result of her wounds.