Diffusion in group IV, III-V and II-VI semiconductors is an interesting problem not only from a fundamental physics viewpoint but also in practical terms, since it could determine the useful lifetime of a device. Any attempt to control the amount of diffusion in a semiconductor device, whether it be a quantum well structure or not, requires an accurate determination of the diffusion coefficient. The present theoretical study shows that this could be achieved via x-ray diffraction studies in quantum well structures. It is demonstrated that the rocking curves of single quantum wells are not sensitive to diffusion. However the intensity of the first order satellite, which is characteristic of superlattice rocking curves, is strongly dependent upon diffusion and it is proposed that this technique could be used to measure the diffusion coefficient D.