Deadly flash floods had destroyed hundreds of homes, makeshift shelters and some historic sites in western Afghanistan.