# Pass multiple data files to a collection

**URL:** <https://community.postman.com/t/pass-multiple-data-files-to-a-collection/899>\
**Category:** Help Hub\
**Tags:** newman-project, collections, csvdatafile\
**Created:** [February 7, 2018, 4:26am UTC](https://community.postman.com/t/pass-multiple-data-files-to-a-collection/899 "2018-02-07T04:26:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![amruta.kale](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@amruta.kale](https://community.postman.com/u/amruta.kale)\
**Post date:** [February 7, 2018, 4:26am UTC](https://community.postman.com/t/pass-multiple-data-files-to-a-collection/899/1 "2018-02-07T04:26:17Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

Hi,

Is there a way to pass multiple data files to a collection either in collection runner or in newman? one per folder within the collection?

Thanks,  
Amruta

---

<div class="post-metadata">

**Author:** ![\_pjoshi\_126](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/_pjoshi_126/32/44_2.png) [@\_pjoshi\_126](https://community.postman.com/u/_pjoshi_126)\
**Post date:** [February 8, 2018, 5:03am UTC](https://community.postman.com/t/pass-multiple-data-files-to-a-collection/899/2 "2018-02-08T05:03:51Z")

</div>

@amruta.kale I am afraid right now you can’t pass data files per folder in a collection. Newman and collection runner do support data files and which behaves as parameters for each iteration of a collection run. Here is the [link](https://www.getpostman.com/docs/postman/collection_runs/working_with_data_files) to know more about how data files are useful while running a collection through Newman or collection runner.

---

<div class="post-metadata">

**Author:** ![amruta.kale](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@amruta.kale](https://community.postman.com/u/amruta.kale)\
**Post date:** [February 8, 2018, 10:23pm UTC](https://community.postman.com/t/pass-multiple-data-files-to-a-collection/899/3 "2018-02-08T22:23:59Z")

</div>

Thanks Prakhar, can this be considered as a feature request? Looks like a few people have the same need

---

<div class="post-metadata">

**Author:** ![\_pjoshi\_126](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/_pjoshi_126/32/44_2.png) [@\_pjoshi\_126](https://community.postman.com/u/_pjoshi_126)\
**Post date:** [February 9, 2018, 3:16am UTC](https://community.postman.com/t/pass-multiple-data-files-to-a-collection/899/4 "2018-02-09T03:16:33Z")

</div>

@amruta.kale It’s not in roadmap yet, but yes we will keep you posted once we provide this feature. Thanks for pointing this out.

---

<div class="post-metadata">

**Author:** ![kgkamble](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@kgkamble](https://community.postman.com/u/kgkamble)\
**Post date:** [October 18, 2020, 8:39pm UTC](https://community.postman.com/t/pass-multiple-data-files-to-a-collection/899/5 "2020-10-18T20:39:32Z")

</div>

Any updates on this?

---

<div class="post-metadata">

**Author:** ![sokolovskiya](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/sokolovskiya/32/6327_2.png) [@sokolovskiya](https://community.postman.com/u/sokolovskiya)\
**Post date:** [November 13, 2020, 1:44pm UTC](https://community.postman.com/t/pass-multiple-data-files-to-a-collection/899/6 "2020-11-13T13:44:58Z")

</div>

@_pjoshi_126 Are there any updates on that topic? In my case I want to use 1 data file for sending requests and another one to compare response data with web service output file. Right now I’m uploading data from the second file through google API but maybe there is the simplest way to do it.

---

<div class="post-metadata">

**Author:** ![zhzhang135](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/zhzhang135/32/7105_2.png) [@zhzhang135](https://community.postman.com/u/zhzhang135)\
**Post date:** [January 26, 2021, 7:55pm UTC](https://community.postman.com/t/pass-multiple-data-files-to-a-collection/899/7 "2021-01-26T19:55:34Z")

</div>

Is there any updates on this feature? This would be a very useful usecase in our team. We need to put several different files to different endpoints, and supporting choosing multiple data file in collection runner will help us put them to the destination. Thanks!

---

<div class="post-metadata">

**Author:** ![meilliez.antoine](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@meilliez.antoine](https://community.postman.com/u/meilliez.antoine)\
**Post date:** [September 14, 2021, 12:56pm UTC](https://community.postman.com/t/pass-multiple-data-files-to-a-collection/899/8 "2021-09-14T12:56:55Z")

</div>

Totally agree. This feature would be very useful for advanced testing use cases.

---

<div class="post-metadata">

**Author:** ![marcodejesus](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@marcodejesus](https://community.postman.com/u/marcodejesus)\
**Post date:** [October 28, 2021, 3:50pm UTC](https://community.postman.com/t/pass-multiple-data-files-to-a-collection/899/9 "2021-10-28T15:50:42Z")

</div>

What about following this approach?

> <https://github.com/postmanlabs/newman/issues/2215#issuecomment-953971752>
>
> How to pass multiple csv files in newman run?
> 
> newman run CollectionRunner.jso…n --global-var IP\_PORT="http://127.0.0.1:8088/" -r htmlextra --reporter-htmlextra-title "Result Report" --reporter-htmlextra-export /home/reports/HARISH.html --iteration-data /home/dataset1.csv
> 
> I want to pass multiple data sets to the collection, I have dataset1,dataset2,dataset3,dataset4 in my directory. all should gets executed for the collectionRunner and the RESULT REPORT should contain all the result,
> 
> I tried something like this, newman run CollectionRunner.json --global-var IP\_PORT="http://127.0.0.1:8088/" -r htmlextra --reporter-htmlextra-title "Result Report" --reporter-htmlextra-export /home/reports/Result.html --iteration-data /home/dataset1.csv --iteration-data /home/dataset2.csv --iteration-data /home/dataset3.csv
> 
> But its not working

It worked from newman.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [August 24, 2023, 2:35pm UTC](https://community.postman.com/t/pass-multiple-data-files-to-a-collection/899/10 "2023-08-24T14:35:44Z")

</div>

Closed on August 24, 2023, 2:35pm UTC


