Molding of a dense film of spherical poly(acrylate/methyl methacrylate) (PAA-PMMA) beads is used as unique templating agent to obtain TiO2 scaffold layers with controlled porosity. The porosity obtained is of hundreds of nanometers, much larger than the one typically reported for the porous layers of Gratzel- or perovskite- type cells. It is shown that the film thickness and roughness, and the pore size are strongly dependent on the roughness of the substrate for identical deposition conditions. In order enhance the conductivity of the TiO2 scaffold layer, a sol-gel mixture of titanium and tin is also successfully tested. Such films are potentially interesting as electron transport layer in perovskite solar cells since they allow an enhanced specific surface and a better control of the interface with the infiltrated photoactive material which are essential for an efficient charge collection.