In Mule , how to check two files exists or not

how to check two files exists or not. I mean two file patterns i.e. File* and errorFile*, if they exist then trigger a flow.

1 answer

  • answered 2018-07-12 07:00 Nagesh Naik

    Maybe you should elaborate more about what you have attempted till now.

    Following steps should help you go through:

    1. Get a list of files at the location using 'List' element of the SFTP connector (Mule 4).
    2. Parse this list and if you find the required filename, set a flow variable to a certain value.
    3. Make use of the Choice element to trigger a subflow based on the value of the variable.