# Pre-roll FOLDER instead of typing out each path

**URL:** <https://forums.plex.tv/t/pre-roll-folder-instead-of-typing-out-each-path/238085>\
**Category:** Feature Suggestions\
**Tags:** library-management\
**Created:** [June 7, 2018, 7:30am UTC](https://forums.plex.tv/t/pre-roll-folder-instead-of-typing-out-each-path/238085 "2018-06-07T07:30:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aR3SA4Ry](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@aR3SA4Ry](https://forums.plex.tv/u/aR3SA4Ry)\
**Post date:** [June 7, 2018, 7:30am UTC](https://forums.plex.tv/t/pre-roll-folder-instead-of-typing-out-each-path/238085/1 "2018-06-07T07:30:19Z")

</div>

I just found the pre-roll feature. Kind of cool. But to me, the value is in randomizing among several (even dozens) of clips. Seeing the same thing over and over will get old quick.

But having to type out /my/path/to/preroll/this\_one.mp4;/my/path/to/preroll/another\_one.mp4 (etc etc etc) also gets old quick!

I think it would be WORLDS better to just specify, for example, “/my/path/to/prerolls”

No?

---

<div class="post-metadata">

**Author:** ![Zilverone](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/zilverone/32/88119_2.png) [@Zilverone](https://forums.plex.tv/u/Zilverone)\
**Post date:** [July 19, 2018, 4:29am UTC](https://forums.plex.tv/t/pre-roll-folder-instead-of-typing-out-each-path/238085/2 "2018-07-19T04:29:51Z")

</div>

I was just searching before suggesting the same thing. The pre-roll feature is great. I love it. But I have a couple of dozen video files that Plex chooses from and smashing all of the paths into one text field kinda sucks. Especially if I have to edit. Copy/Paste to a text editor, find where I need to make a change and do it, copy paste back into the text field. It would be so much better if all we needed to do was select a folder and tell Plex to either select a video from it randomly, play all in sequence, or play the next file. Just dump all the video files into that folder and let it rip each time you start a movie. Nice, clean and simple.

---

<div class="post-metadata">

**Author:** ![Vitani](https://avatars.discourse-cdn.com/v4/letter/v/c4cdca/32.png) [@Vitani](https://forums.plex.tv/u/Vitani)\
**Post date:** [December 2, 2019, 5:34pm UTC](https://forums.plex.tv/t/pre-roll-folder-instead-of-typing-out-each-path/238085/3 "2019-12-02T17:34:23Z")

</div>

Fantastic idea, in the mean-time you can use bash to generate the field -

`ls -dp /fully/qualified/path/to/folder/*.mkv | tr '\n' ';'`

Edit: Powershell version -

`(Get-ChildItem C:\Fully\Qualified\Path\To\Folder\* -include ('*.mkv', '*.mp4') | select -ExpandProperty FullName) -join ';'`

---

<div class="post-metadata">

**Author:** ![abirds736](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@abirds736](https://forums.plex.tv/u/abirds736)\
**Post date:** [April 6, 2023, 11:42pm UTC](https://forums.plex.tv/t/pre-roll-folder-instead-of-typing-out-each-path/238085/4 "2023-04-06T23:42:49Z")

</div>

Hi, can you please help me with how to implement this fix? Not sure what to do with your text, but this seems like a local solution?

---

<div class="post-metadata">

**Author:** ![Vitani](https://avatars.discourse-cdn.com/v4/letter/v/c4cdca/32.png) [@Vitani](https://forums.plex.tv/u/Vitani)\
**Post date:** [April 11, 2023, 2:00pm UTC](https://forums.plex.tv/t/pre-roll-folder-instead-of-typing-out-each-path/238085/6 "2023-04-11T14:00:00Z")

</div>

Assuming you’re using Windows -

- Open _File Explorer_ (`🪟+E`)
- Find the folder which has all your pre-rolls in it
- Right-click on this folder and select _Open in PowerShell_ (in Windows 11 this might be _Open in Terminal_)
- In the window that opens, it should say something like “PS C:\Users\Birdy\Videos\Pre-Rolls\> |”, type in (or copy & paste) `(Get-ChildItem .\* -include ('*.mkv', '*.mp4') | select -ExpandProperty FullName) -join ';'` \*
- Press _Enter_
- You should now see the files names of all your pre-roll videos on the screen, use your mouse to select all of the text displayed (but **not** the last line which starts with "PS C:")
- Right-click your mouse - nothing will appear, but it’s now copied the text you selected to your clipboard (if a menu does appear, select _Copy_)
- Navigate in Plex to the _Movie pre-roll video_ setting
- Paste (`Ctrl+V`) the text into the box
- Click _Save Changes_

Hope that helps

\* This command assumes that all your pre-roll videos are either _.mkv_ or _.mp4_ files, if they are not, then change the extensions to whatever matches your files (e.g. _.avi_), you can also add as many as you need in the brackets.

---

<div class="post-metadata">

**Author:** ![abirds736](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@abirds736](https://forums.plex.tv/u/abirds736)\
**Post date:** [April 11, 2023, 2:12pm UTC](https://forums.plex.tv/t/pre-roll-folder-instead-of-typing-out-each-path/238085/7 "2023-04-11T14:12:10Z")

</div>

Thanks! I will check it out. Appreciate you typing this out!

---

<div class="post-metadata">

**Author:** ![sych0x51](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@sych0x51](https://forums.plex.tv/u/sych0x51)\
**Post date:** [January 29, 2024, 1:23am UTC](https://forums.plex.tv/t/pre-roll-folder-instead-of-typing-out-each-path/238085/8 "2024-01-29T01:23:27Z")

</div>

sure would be nice to have this more streamlined with a folder instead of typing out paths over and over.
