SSIS为每个文件循环和文件系统任务复制文件 [英] SSIS For Each File Loop and File System Task to copy Files

查看:161
本文介绍了SSIS为每个文件循环和文件系统任务复制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在每个循环容器中使用一个文件系统任务,就像这里所描述的:
link text

然而,当我执行包时,我得到这个错误:
[File System Task ]错误:出现以下错误消息的错误:进程无法访问文件C:\ Book1.xlsx,因为它正在被另一个进程使用。



我没有打开文件,而且我也没有其他人这样做,因为我可以复制,打开和覆盖文件。



任何建议,将不胜感激。
如果你想要一个示例包plz,请告诉我。

解决方案

我已经知道了这个问题。请确保在文件系统任务中不要创建文件连接(您可以在连接管理器选项卡中看到它们),该文件连接保持与源文件使用的路径相同的变量。

I'm using a files system task inside a for each loop container, just as described here: link text

However, when I execute the package I get this error: [File System Task] Error: An error occurred with the following error message: "The process cannot access the file 'C:\Book1.xlsx' because it is being used by another process.".

I do not have the file open, and I assume no one else does, as I am able to copy, and open, and overwrite the file.

Any suggestions would be appreciated. If you want an example package plz let me know.

解决方案

I've figured out the problem. Be sure to not create File connections(you can see them in the Connection Managers tab) that hold on to the same variable as the path you are using for the source file, in the File System Task.

这篇关于SSIS为每个文件循环和文件系统任务复制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆