DECLARE @SQL VARCHAR(1000) DECLARE @Dt DATETIME SET @Dt = GETDATE() SET @SQL = 'xcopy "soruce*.*" "Destination" /e /i /h ' PRINT @SQL EXEC master.dbo.xp_cmdshell @SQL