In Azure Data Factory (ADF), copying multiple files in a single Copy Activity is definitely possible and common.
Here’s how you can copy 1000 files in one Copy Activity from a source folder to a destination folder:
Option 1: Copy entire folder (recommended when files are in one folder)
If all 1000 files are inside a specific folder (and you want to copy all files from that folder):
-
Source dataset: Configure your dataset pointing to the folder (not individual files), e.g. Azure Blob Storage or ADLS Gen2 folder.
-
In your Copy Activity source settings, set:
- File path type: Folder
- Wildcard file name: Use wildcard like
* to select all files in the folder.
-
Sink dataset: Point to the destination folder.
-
The Copy Activity will copy all files that match the wildcard from source folder to sink folder.
This way, one Copy Activity can copy all files without you defining each file individually.
Option 2: Using wildcard file path patterns
If you want to copy only specific files matching a pattern (e.g., all .csv files):
- Use wildcard file path in Source -> File path type = Folder
- Use Wildcard file name =
*.csv or other patterns
Option 3: Using a list of files (for files in different folders or non-contiguous files)
- Use a Get Metadata activity or Lookup activity (e.g., list files from source folder(s)).
- Fetch list of files into a variable or pipeline array.
- Use a ForEach activity with a Copy Activity inside it to copy each file – but this means multiple copy activities running inside loop and not a single Copy Activity copying all files at once.
Important Notes about copying multiple files with a single Copy Activity:
- Source and sink datasets must be folder-level datasets, not file-level datasets.
- Wildcards enable batch copy of all matching files.
- Copy Activity supports copying entire folder contents with subfolders optionally included if you enable “Recursive” copy.
- Max file count depends on file sizes and throughput, but thousands of files are normally supported.
Quick steps summary to copy 1000 files in one Copy Activity:
- Create a Source dataset pointing to the folder containing files.
- Set the dataset’s path to the folder only, and in Copy Activity source tab, leave filename empty or use wildcards like
* for all files.
- Create a Sink dataset, pointing to the destination folder.
- In Copy Activity, enable Copy recursively if subfolders need to be included.
- Run your pipeline.
Example for Azure Blob Storage Source Dataset JSON snippet:
{
"name": "BlobSourceDataset",
"properties": {
"linkedServiceName": {
"referenceName": "AzureBlobStorageLinkedService",
"type": "LinkedServiceReference"
},
"type": "Binary",
"typeProperties": {
"location": {
"type": "AzureBlobStorageLocation",
"container": "mycontainer",
"folderPath": "sourcefolder"
}
}
}
}
And leave fileName blank to pick all files, or you can use wildcards in Copy Activity source settings.
If your files are scattered across many different folders, then a single Copy Activity might not suffice, and you’d use a ForEach loop.
Let me know if you want me to provide a sample pipeline JSON or detailed step-by-step in the portal!