FourierTransform[DiracComb[x] (UnitBox[(x - 5)/5]), x, w]