开发者

How to upload mutiple files by FTP task in SSIS

I like to upload multiple files, with different names, in 开发者_StackOverflow社区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


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.


Put all the files in the same folder. Use FTP task inside a ForEachLoop and update the connection string using an expression updated by the loop container. That will do the trick.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜