August 21, 2014 at 11:03 pm
Hi All,
I am having source and destination folders.I want to just copy files from source to destination.
But while copying i need to fetch files names from table.
for example: Select FileName from mytable. IF the output FileName from query matches with the FIlenAme in source folder then i want to copy that file. How can I do this?
Any sample package or any clue please.......
Thanks
Abhas
August 21, 2014 at 11:43 pm
I'd use a Script Task:
1) Read file names from table into an array.
2) For each array element:
a) perform the file-existence check:
i) If true, copy the file
ii) If false, go to next array element
August 21, 2014 at 11:54 pm
Thanks Phil,
Could you please share sample or design?
Thanks
Abhas
August 22, 2014 at 12:00 am
That is the design.
I'm not going to write the code for you - there are lots of C# loop and copy file examples on-line.
Please have an attempt and then come back here with any specific questions you encounter while developing.
August 22, 2014 at 3:44 am
Thanks,
I tried as below:
First execute sql task, Fetching file names and storing into variable here.
After i am using for each loop container. in that using script task. but not able to assign file name which i want to copy to variable in script task.
If anybody has idea then please let me know.
Thanks
Abhas.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply