The supramolecular assembly of surfactant molecules at a solid-liquid interface can produce tubular structures with diameters of around 10 nm (refs 1-4), which can be used for the templated polymerization of mesoporous silica thin films(3-5). The orientation of the tubules depends primarily on the nature of the substrate-surfactant interaction. These nanostructured films hold much promise for applications such as their use as orientated nanowires(6), sensor/actuator arrays(7-9) and optoelectronic devices(10), But a method of patterning the tubules and orientating them into designed arrangements is required for many of these possibilities to be realized. Here we describe a method that allows the direction of growth of these tubules to be guided by infiltrating a reaction fluid into the microcapillaries of a mould in contact with a substrate(11). An electric field applied tangentially to the surface within the capillaries induces electro-osmotic flow, and also enhances the rates of silica polymerization around the tubules by localized Joule heating. After removal of the mould, patterned bundles of orientated nanotubules remain on the surface. This method permits the formation of orientated mesoporous channels on a non-conducting substrate with an arbitrary microscopic pattern.