# What determined $loop(,1) selection?

**URL:** https://community.mp3tag.de/t/what-determined-loop-1-selection/6202
**Category:** Support
**Created:** [February 6, 2008, 7:46pm UTC](https://community.mp3tag.de/t/what-determined-loop-1-selection/6202 "2008-02-06T19:46:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [February 6, 2008, 7:46pm UTC](https://community.mp3tag.de/t/what-determined-loop-1-selection/6202/1 "2008-02-06T19:46:42Z")

</div>

Can anyone tell me what determines which file in each folder is selected by $loop(%\_folderpath%,1)?

I find often is is the alphabetically first, but occasionally it is the last or one in the middle. Is it just undefined i.e. pot luck?

I 'd be interested to know what determined the choice, and how I can control it, to get e.g. just the alphabetically first.

Thanks.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [February 7, 2008, 9:02pm UTC](https://community.mp3tag.de/t/what-determined-loop-1-selection/6202/2 "2008-02-07T21:02:33Z")

</div>

It's the first file of the set of files the current loop operates on.

The order of the files is -- for the outermost loop -- the order of the files in the file view or -- in all other cases -- the order of files determined by the enclosing loop.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [February 7, 2008, 11:02pm UTC](https://community.mp3tag.de/t/what-determined-loop-1-selection/6202/3 "2008-02-07T23:02:57Z")

</div>

> for the outermost loop -- the order of the files in the file view

Ah, that's good, and good to know. Thanks, Florian.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:20pm UTC](https://community.mp3tag.de/t/what-determined-loop-1-selection/6202/4 "2026-02-09T12:20:45Z")

</div>


