Just quick code for copy file from one folder to another folder using sql server tsql script.

You can use xp_cmdshell command to copy file as follows

Declare @SqlCopy varchar(2000)

DECLARE @FileName varchar(500)

Declare @OutputFolderPath varchar(500)

set @OutputFolderPath = 'C:\targetfoldername'

Set @ZipFileName = 'C:\sourcefolder\filename.txt'

 

SET @SqlCopy =  ' COPY /Y ' + @ZipFileName + ' /B ' + @OutputFolderPath

print @SqlCopy

EXEC master..xp_cmdshell @SqlCopy

 

Enjoy!