Structural features of diamondlike metal-doped carbon films are studied by means of optical second-harmonic generation (SHG). A high interfacial sensitivity of the SHG probe and its significant enhancement in metal nanoparticles allows one to distinguish between clusterlike and amorphous atomic scale structure of carbon-metal composites. These films appear to retain a stable amorphous atomic-scale structure in a wide range of metal concentration above the percolation threshold. Atomic-to-mesoscopic scale structural transition in diamondlike metaldoped carbon films is observed, which takes place under the thermal annealing.