Hello,
I have this statement to copy file from location a to location b. I ran this in query analyser, it says file copied but i dont see file in destination folder.Please advice.
Here is code.
DECLARE @fn char(6),
@cmd varchar(100)
SET @fn = REPLACE(CONVERT(char(8), getdate(), 1), '/', '')
SET @cmd = 'copy /Y \\fns01\fncommon\apps\doctracking\sample.xls \\fns01\fncommon\apps\doctracking\test\sample' + @fn + '.xls'
print @cmd
EXEC master..xp_cmdshell @cmd
I have this statement to copy file from location a to location b. I ran this in query analyser, it says file copied but i dont see file in destination folder.Please advice.
Here is code.
DECLARE @fn char(6),
@cmd varchar(100)
SET @fn = REPLACE(CONVERT(char(8), getdate(), 1), '/', '')
SET @cmd = 'copy /Y \\fns01\fncommon\apps\doctracking\sample.xls \\fns01\fncommon\apps\doctracking\test\sample' + @fn + '.xls'
print @cmd
EXEC master..xp_cmdshell @cmd