The effect of surface condition on the out-diffusion of atoms through a thin film to the free surface has been analyzed by considering the coupling between grain boundary diffusion and surface diffusion. It is demonstrated that under certain circumstances, the surface diffusion rate can have a large effect on the measured rate of diffusion through the thin film. In the analysis for the cases involving out-diffusion, the surface is treated as a sink of finite capacity and the saturation level of material accumulation at the surface is discussed in terms of a surface-segregation ratio. This analysis can qualitatively explain some of the recent experimental observations on the effect of the annealing ambient on out-diffusion. The opposite but similar problem of the effect of the source surface condition on the rate of in-diffusion from the surface has also been discussed.