How can I append the name of all files in Folders and Sub-Folders inside the same Variable in Azure Data factory?

Anonymous
2022-05-03T11:49:16.81+00:00

I have a requirement in Azure Data Factory where there are files in Folders and Sub-Folders. I have highlighted the structure of the same below for reference.
198474-image.png

I want to Understand how I can use an Array Variable and append all the filenames inside the variable and set the array as the variable's Value.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,471 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Nandan Hegde 29,886 Reputation points MVP
    2022-05-04T04:12:55.893+00:00

    Hey,
    You can use Get metedata activity to get the list of all files within a folder.
    In case of sub folders, reiterate over the new path.
    Then iterate it over via For activity and use Append variable activity to append the file names in an Array variable