# How to run a sub-folder in Postman

**URL:** <https://community.postman.com/t/how-to-run-a-sub-folder-in-postman/11103>\
**Category:** Help Hub\
**Tags:** newman-project\
**Created:** [February 29, 2020, 6:46am UTC](https://community.postman.com/t/how-to-run-a-sub-folder-in-postman/11103 "2020-02-29T06:46:53Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xuyen](https://avatars.discourse-cdn.com/v4/letter/x/b38774/32.png) [@Xuyen](https://community.postman.com/u/Xuyen)\
**Post date:** [February 29, 2020, 6:46am UTC](https://community.postman.com/t/how-to-run-a-sub-folder-in-postman/11103/1 "2020-02-29T06:46:53Z")

</div>

**I have a collection and many of sub-folder in this collection, how can I run specific folder?  
I tried with --folder parameter but it does not work**

---

<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:** [February 29, 2020, 9:06am UTC](https://community.postman.com/t/how-to-run-a-sub-folder-in-postman/11103/2 "2020-02-29T09:06:14Z")

</div>

Hey @Xuyen,

Would you be able to provide some more implementation details and more clarification about what doesn’t work, please?

One of the ways that this might not work is if there were folders with the same name, this might not pick up the correct folder for the run.

Just to show you it working in the most basic way, I’ve created an example below.

If I have a Collection with the structure like this:

![Screenshot 2020-02-29 at 08.51.19](https://us1.discourse-cdn.com/getpostman/original/3X/0/b/0bcc4877734a00c596a4a999bd299025dddeaba2.png)

Running Newman with the `--folder F1` would run both sub-folders:

 ![Screenshot 2020-02-29 at 08.57.34](https://us1.discourse-cdn.com/getpostman/original/2X/e/e3df1f9727c76c11c16b8c7cf79c026ae60b9a29.jpeg)

Running Newman with the `--folder F1a` would run that folder and the `R1` request:

 ![Screenshot 2020-02-29 at 08.55.32](https://us1.discourse-cdn.com/getpostman/original/3X/5/b/5b03b23c09c09b6a7678af00435416922226d799.jpeg)

Running Newman with the `--folder F1b` would run that folder and the `R2` request:

 ![Screenshot 2020-02-29 at 08.56.11](https://us1.discourse-cdn.com/getpostman/original/3X/9/8/98f8e396f8fde67e39ebfc8af8ae862dd1f42c63.jpeg)

This can also work, if there was another sub-folder `F1aa`, inside the `F1a` sub-folder:

 ![Screenshot 2020-02-29 at 09.01.11](https://us1.discourse-cdn.com/getpostman/original/3X/4/3/43c1e8ce96762a810db659048ac1ce3a9cf7e1de.jpeg)

---

<div class="post-metadata">

**Author:** ![Xuyen](https://avatars.discourse-cdn.com/v4/letter/x/b38774/32.png) [@Xuyen](https://community.postman.com/u/Xuyen)\
**Post date:** [March 2, 2020, 10:54am UTC](https://community.postman.com/t/how-to-run-a-sub-folder-in-postman/11103/3 "2020-03-02T10:54:49Z")

</div>

Hi @danny-dainton,

it works perfect with your solution. My wrong as provided the full path for sub-folder like F1/F1a…

Many thanks for your support!

Thanks,  
Xuyen Tran

---

<div class="post-metadata">

**Author:** ![b.mcdonald2323](https://avatars.discourse-cdn.com/v4/letter/b/51bf81/32.png) [@b.mcdonald2323](https://community.postman.com/u/b.mcdonald2323)\
**Post date:** [September 28, 2020, 7:07pm UTC](https://community.postman.com/t/how-to-run-a-sub-folder-in-postman/11103/4 "2020-09-28T19:07:06Z")

</div>

Does this mean that all subfolders have to have unique names in order for you to target a specific subfolder (using --folder {sub-folderName})? I ask because with the way i have my collection structured, i have several subfolders containing duplicate names and it would be a real hassle to have to go back through each and every subfolder and re-name them to something unique. Why doesn’t postman provide the capability to simply provide the collection folder path to the subfolder in question??

---

<div class="post-metadata">

**Author:** ![varikuti](https://avatars.discourse-cdn.com/v4/letter/v/58956e/32.png) [@varikuti](https://community.postman.com/u/varikuti)\
**Post date:** [April 28, 2021, 1:19pm UTC](https://community.postman.com/t/how-to-run-a-sub-folder-in-postman/11103/5 "2021-04-28T13:19:00Z")

</div>

Hi @danny-dainton ,

i am facing the issue similar like this , i have one collection and with in that i have one folder and many subfolders with in that .

When i run the folder only the first subfolder is running and remaining subfolders are not getting runned . Do you know why this happens ,

Below is my structure

![image](https://us1.discourse-cdn.com/getpostman/original/3X/5/d/5dea59ffcdcf2fcacf796d1b7f857bebe6a7e1dd.png)

Here C4PO is my collection and CRUD is my folder and you can see subfolders like carriers,warehouse etc .

When i run using the following command newman run

`C4PO.postman_collection.json --folder "CRUD"`

it is only running the first subfolder i.e carriers .

Thanks in advance

Happy Testing 🙂

---

<div class="post-metadata">

**Author:** ![SaravananSeenivasan](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/saravananseenivasan/32/8301_2.png) [@SaravananSeenivasan](https://community.postman.com/u/SaravananSeenivasan)\
**Post date:** [April 30, 2021, 4:58am UTC](https://community.postman.com/t/how-to-run-a-sub-folder-in-postman/11103/6 "2021-04-30T04:58:23Z")

</div>

Hi @varikuti,

it should run all folder inside CRUD, when I tried the same it is working fine, update the collections and export, then try running one more time, thanks

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/f/f/ff01fe8fe49754f94ff72d446c71e307c8c56743.png)

---

<div class="post-metadata">

**Author:** ![varikuti](https://avatars.discourse-cdn.com/v4/letter/v/58956e/32.png) [@varikuti](https://community.postman.com/u/varikuti)\
**Post date:** [April 30, 2021, 7:17am UTC](https://community.postman.com/t/how-to-run-a-sub-folder-in-postman/11103/7 "2021-04-30T07:17:37Z")

</div>

Hi @SaravananSeenivasan ,

i figured out the issue on why it is not running the subfolders. i have next requests in pre-request and for the last request i have kept next request as null . So it is stopping to run other subfolders because of that. Thanks for the reply.

Regards  
Bharath

---

<div class="post-metadata">

**Author:** ![indu](https://avatars.discourse-cdn.com/v4/letter/i/eada6e/32.png) [@indu](https://community.postman.com/u/indu)\
**Post date:** [November 24, 2021, 5:50am UTC](https://community.postman.com/t/how-to-run-a-sub-folder-in-postman/11103/8 "2021-11-24T05:50:57Z")

</div>

Hi @danny-dainton, @SaravananSeenivasan ,

I am trying to execute a collection with many sub-folders from Newman. Do the requests be named unique names to execute all requests in the Subfolders?

All sub-folders now contain the same set of requests. When I run the collection only requests from first sub-folder gets executed.

Thank you!  
Indu

---

<div class="post-metadata">

**Author:** ![elwillbo](https://avatars.discourse-cdn.com/v4/letter/e/dc4da7/32.png) [@elwillbo](https://community.postman.com/u/elwillbo)\
**Post date:** [December 1, 2021, 3:37pm UTC](https://community.postman.com/t/how-to-run-a-sub-folder-in-postman/11103/9 "2021-12-01T15:37:59Z")

</div>

@indu In my experience that is indeed the case ☹ I’ve had to make sure they have unique names instead of being able to do the path

---

<div class="post-metadata">

**Author:** ![shane.unipro](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@shane.unipro](https://community.postman.com/u/shane.unipro)\
**Post date:** [July 12, 2023, 6:09am UTC](https://community.postman.com/t/how-to-run-a-sub-folder-in-postman/11103/10 "2023-07-12T06:09:42Z")

</div>

Hello all,  
I think I have found a solution for this.  
Suppose you have multiple folders and subfolders in your collection like the following:  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/a/0ad138c85b465cf6a246fadea6e4460f000eb0d9.png)

I want to run the requests R1 & R3.

Simply add in your command --folder R1 – folder R3

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/2/9/291bb078f0c6d7706c0c5ec72471ca4808ef3e03.png)

---

<div class="post-metadata">

**Author:** ![achrafz](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@achrafz](https://community.postman.com/u/achrafz)\
**Post date:** [January 17, 2024, 5:05pm UTC](https://community.postman.com/t/how-to-run-a-sub-folder-in-postman/11103/11 "2024-01-17T17:05:58Z")

</div>

same problem here 😕
