# Using postman.setNextRequest() within a pre-request script of a folder dosn't appear to do what I think it should do

**URL:** <https://community.postman.com/t/using-postman-setnextrequest-within-a-pre-request-script-of-a-folder-dosnt-appear-to-do-what-i-think-it-should-do/50497>\
**Category:** Help Hub\
**Tags:** csvdatafile, folders, pre-request-script\
**Created:** [August 11, 2023, 10:54am UTC](https://community.postman.com/t/using-postman-setnextrequest-within-a-pre-request-script-of-a-folder-dosnt-appear-to-do-what-i-think-it-should-do/50497 "2023-08-11T10:54:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![swinster](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@swinster](https://community.postman.com/u/swinster)\
**Post date:** [August 11, 2023, 11:11am UTC](https://community.postman.com/t/using-postman-setnextrequest-within-a-pre-request-script-of-a-folder-dosnt-appear-to-do-what-i-think-it-should-do/50497/2 "2023-08-11T11:11:30Z")

</div>

Ok, I think I get it.

The pre-request script of the _folder_ is simply something that will run before every request in the folder run, and the rules regarding the `postman.setNextRequest` function still apply - i.e. that it will run AFTER the current request finishes. This means that it looks like the first request MUST complete before the `postman.setNextRequest` function takes effect (so you cannot skip the first request at all).

I have just come across [Iterating only a single request inside a collection with test data specified in a csv file - #6 by nishant.shah2](https://community.postman.com/t/iterating-only-a-single-request-inside-a-collection-with-test-data-specified-in-a-csv-file/12772/6), and in this topic, they used a dummy request as the first request. I’m unsure if this is the best option, but it works.

---

_[View the full topic](https://community.postman.com/t/using-postman-setnextrequest-within-a-pre-request-script-of-a-folder-dosnt-appear-to-do-what-i-think-it-should-do/50497)._
