Speaking in Daraya, a former rebel stronghold recently surrendered to the government, Assad said "the Syrian state is determined to recover every area from the terrorists," state media reported.
"The armed forces are continuing their work, relentlessly and without hesitation, regardless of internal or external circumstances," he said.
Assad made a rare public appearance to celebrate the Muslim Eid al-Adha holiday in Daraya, where state media showed him attending prayers at the Saad Bin Moaz mosque.
After years of government siege and fighting, its remaining residents and rebel fighters evacuated the town in late August under a deal with the regime, which has since retaken control.
"After five years, some people still haven't woken up from their fantasies," Assad said, referring to the anti-government protests that erupted in Syria in 2011.
"Some were betting on promises from foreign powers, which will result in nothing," he added.
Signup to our newsletter and follow us on Facebook and Twitter!
Assad was joined at the prayers by a number of members of his ruling Baath party, as well as several ministers and members of parliament.
The mufti, or Muslim cleric, presiding over the prayers, hailed Daraya as an example for Syria, which has been ravaged by conflict since 2011.
"Daraya is living proof for all Syrians that the only option available to you is reconciliation and abandoning fighting," said Adnan al-Afiyuni, mufti for Damascus province.
Rebel fighters said they had been forced to agree the deal with the government after the siege created a humanitarian crisis for Daraya's remaining residents.
But the government has touted the deal, and other similar agreements, as the best way to achieve local ceasefires and end the violence.
More than 290,000 people have been killed and over half the population displaced since the conflict began.