SQL code to perform the functions described in the body of this question

Could somebody help with coding in SQL to perform the following...

check folder - \\cluster\data\Direxxis\Erie\incoming\
if there is a matrix file – eg. Erie_Creative_Matrix_20140403.xlsx
remove the date portion eg. _20140403
copy matrix file without the date portion to \\cluster\data\Direxxis\Erie\incoming\
    - but before changing the file name copy the original eg. Erie_Creative_Matrix_20140403.xlsx to
\\cluster\data\Direxxis\Erie\Archived_Incoming\CreativeMatrix
tesla764Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Brian CroweConnect With a Mentor Database AdministratorCommented:
I would strongly recommend doing this in an SSIS package instead of trying to script it.  Below is a tutorial on how to do that.

http://sqlsaga.com/ssis/how-to-copy-files-from-one-folder-to-another-in-ssis-using-file-system-task/
0
 
tesla764Author Commented:
Thanks.
0
All Courses

From novice to tech pro — start learning today.