Question: how to copy files from one folder to another in sql server?
Answer: You can use the dir /b command to write a text file with the file names in it, then write the names to a table, use a select statement with a distinct clause to pull your files names back out and move your files. You should only end up with unique files that way. SQL Server is not the right tool for this.