# Iterate though directory files and submit each file as form-data payload

**URL:** <https://community.postman.com/t/iterate-though-directory-files-and-submit-each-file-as-form-data-payload/39421>\
**Category:** Help Hub\
**Tags:** newman-project, form-data, collection-runner\
**Created:** [September 23, 2022, 7:27pm UTC](https://community.postman.com/t/iterate-though-directory-files-and-submit-each-file-as-form-data-payload/39421 "2022-09-23T19:27:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![priyanktrivedi](https://avatars.discourse-cdn.com/v4/letter/p/7cd45c/32.png) [@priyanktrivedi](https://community.postman.com/u/priyanktrivedi)\
**Post date:** [September 23, 2022, 7:27pm UTC](https://community.postman.com/t/iterate-though-directory-files-and-submit-each-file-as-form-data-payload/39421/1 "2022-09-23T19:27:48Z")

</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).

> Here’s an outline with best practices for making your inquiry.

_I am trying to send multiple files with same filetype within the same directory as form-data_:

_Details (like screenshots)_:  
We have multiple .dat files within same directory and would like to use postman to iterate through directory and send one file at a time as form-data \> body .

 ![postman-forum](https://us1.discourse-cdn.com/getpostman/original/3X/2/8/28b266823a1476bcbbaed0c8e7cde098f90e7705.png)

Is there a way to do this ? preferably without newman but if you have any solution with newman I will take that as well.

_I’ve already tried_:  
I have already tried collection runner and tried searching this issue in Github as well as stack-overflow and here in the forums but am not able to find a solution which may satisfy our requirements.

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [September 27, 2022, 1:06pm UTC](https://community.postman.com/t/iterate-though-directory-files-and-submit-each-file-as-form-data-payload/39421/2 "2022-09-27T13:06:44Z")

</div>

I’m not sure Postman is the right tool for this type of activity.

I would probably use PowerShell and Invoke-WebRequest (or something similar).
