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

Archived topic — this may be out of date.
Newman has been replaced by the Postman CLI, 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 lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.
For current help, see the Postman docs, try the free Postman tools (no account needed), or join us on Discord.

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 .

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.

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