Check if file exist in SSIS

Jefferson-2765 566 信誉分
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
SQL Server
Microsoft 关系数据库管理和分析系统的一个系列,用于实现电子商务、业务线和数据仓库解决方案。
189 个问题
0 个注释 无注释
{count} 票

接受的答案
  1. ZoeHui-MSFT 39,496 信誉分
    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 个其他答案

排序依据: 非常有帮助

你的答案

问题作者可以将答案标记为“接受的答案”,这有助于用户了解已解决作者问题的答案。