May 26, 2014 at 9:40 am
Hi everyone, I'm trying to do one task but i can't find solution...
I got one cloumn in table contain fill path (Different locations -pdf files
Ex: C:/report.pdf.
C:/new/ report1.pdf,
D:/New Fodler/report2.pdf
) , i want to move those files to one location using SSIS..If i didn't find one pdf file in location, need to skip and execute next one..please help me out.thanks in advance.
May 28, 2014 at 1:16 pm
Create a Object variable
Use Execute SQL Task to Copy the Output of Select <ColumnnameWhichhaspath> from <Table>
into this Object Variable
Use foreach ADO.net enumerator and Loop through all records in the Object Variable
and when you are looping each time you can copy the fileLocation into variable
use this variable as Source to a FileSystem task and as Destination is fixed,keep a constant destination
May 28, 2014 at 6:26 pm
Or, skip SSIS and use a call to RoboCopy.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 29, 2014 at 2:45 am
I'm attempting to do something very similar at the moment.
My task however is slightly different...
What i am trying to do is move files from one location to another location and rename them based on the results returned from a query.
I'm looking at using the "File System Task" option where you can specify the source and destination folder and then use expressions for the source file location and destination file locations.
A simple but useful write is here http://beyondrelational.com/modules/2/blogs/43/posts/10203/ssis-file-operations-copy-file-move-file-rename-file-and-delete-file.aspx
The issue that i am having is that it's proving difficult for me to iterate through the query and rename file.
Hence i am looking into using a "Loop for each" container...but I'm still going through the motions of getting this working.
If i find a way through this I'll let you know, but its been a while since i last used SSIS
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply