The structure of nanowires of different metals grown within nanoporous alumina membranes has been studied by EXAFS, WAXS and high energy X-ray diffraction. Nanowires of gold, silver, copper and iron adopt the lattice structure and bond distances of the bulk metals. Cobalt nanowires on the other hand were composed of a mixture of hcp phase, stable at room temperature, and fcc phase, which in bulk cobalt is normally stable only at high temperatures, in a ratio depending on the pore size. The nanowires are non-continuous but are made of nanocrystallites whose shape and size was found to depend strongly on the metal. All the metals except gold showed the presence of a preferred orientation which was slight in the case of Ag and Cu but much stronger in the case of iron and cobalt nanowires.