Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upload mutiple files by FTP task in SSIS

I like to upload multiple files, with different names, in a single FTP task to server in SSIS package. I am only able to upload one file.

the file names are also different e.g

xyz, zbc, ced

is there any way to upload multiple file in a FTP task in SSIS.

Thanks

like image 450
Adil Bhatty Avatar asked Sep 27 '10 05:09

Adil Bhatty


1 Answers

just stumbled upon this and it was exactly what I was looking for. to elaborate on Faiz's answer:

  1. create the Foreach Loop Container
  2. edit "Collection" in the Foreach Loop Container
  3. set the "Enumerator" to "Foreach File Enumerator"
  4. select the Folder you want to check in
  5. set "Files" to "." or whatever wildcard filter you'd like
  6. select "Fully qualified" as the "Retrieve file name"
  7. click "Variable Mappings" and create a variable named whatever you'd like
  8. drop an "FTP Task" inside of the container
  9. create an "FtpConnection"
  10. click "File Transfer" and set "IsLocalPathVariable" to "True"
  11. select your new variable under "LocalVariable"
  12. set "Operation" to "Send Files"
  13. set whatever remote parameters you'd like

That's it! The variable will automatically update itself with the full path+name of each file found, and then upload it.

like image 103
suttonb1 Avatar answered Sep 28 '22 02:09

suttonb1