Fabrication of micro- and nanoporous metallic films for energy applications