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

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

问题描述

我在 for each 循环容器中使用文件系统任务,正如此处所述:链接文本

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

但是,当我执行包时出现此错误:[文件系统任务] 错误:发生错误并显示以下错误消息:进程无法访问文件 'C:Book1.xlsx',因为它正被另一个进程使用.".

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天全站免登陆