January 17, 2011 at 5:44 pm
Hi,
I have a table within a database that contains two columns DocumentID and DocumentName.
I also have a directory full of pdf files that are named DocumentName.pdf, these files are added to daily with new files, all with the same naming convention.
I would like to run a job daily that would rename files from DocumentName.pdf to DocumentID.pdf
Can anybody put me on the right track, I'm at a bit of a loss how to do it.
Any help greatly appreciated.
Cheers
Rich
January 17, 2011 at 7:54 pm
Look into SSIS and the File System Task or using a Script Task. You can select the records you want to loop through in a SQL task, put them into a recordset and use the built in SSIS For Each Loop to loop through them with the rename task inside that loop. IIRC, you'll want to google SSIS and "shredding a recordset" to come up with some good tutorials.
January 17, 2011 at 8:30 pm
SSIS file system task looks like the go, thanks very much
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply