Check if file exist in SSIS

Jefferson-2765 586 信誉分
2024-12-26T02:28:33.1633333+00:00

I want to check if file exist in SSIS, is it possible to do that without script task?

SQL Server | 其他
0 个注释 无注释
{count} 票

问题作者接受的答案
  1. ZoeHui-MSFT 41,536 信誉分
    2024-12-26T02:54:42.3766667+00:00

    Hi @Jefferson-2765,

    1. Add a ForEach Loop Container to your Control Flow.
    2. On ForEach Collection pane, set Enumerator to "Foreach File Enumerator"
    3. Set Folder to your Source Folder.
    4. Set Files to your File Spec (.).
    5. On Variable Mappings, create new variable "User::FileExistsFileName"
    6. You then just need to configure two output Lines for the ForEach Loop:
    7. For Success Line: Double-click the Connector Line, set:

    Evaluation operation: Expression

    Value: Success

    Expression: @[User::FileExistsFileName] != ""

    1. For Failure Line, set:

    Evaluation operation: Expression or Constraint

    Value: Failure

    Expression: @[User::FileExistsFileName] == ""

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 个注释 无注释

0 个其他答案

排序依据: 非常有帮助

你的答案

提问者可以将答案标记为“已接受”,版主可以将答案标记为“已推荐”,这有助于用户了解答案是否解决了提问者的问题。