# How to create a folder structure based on number of track

**URL:** <https://community.mp3tag.de/t/how-to-create-a-folder-structure-based-on-number-of-track/44451>\
**Category:** Support\
**Created:** [February 7, 2019, 4:02am UTC](https://community.mp3tag.de/t/how-to-create-a-folder-structure-based-on-number-of-track/44451 "2019-02-07T04:02:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![henriquebs12](https://community.mp3tag.de/user_avatar/community.mp3tag.de/henriquebs12/32/8205_2.png) [@henriquebs12](https://community.mp3tag.de/u/henriquebs12)\
**Post date:** [February 7, 2019, 4:02am UTC](https://community.mp3tag.de/t/how-to-create-a-folder-structure-based-on-number-of-track/44451/1 "2019-02-07T04:02:58Z")

</div>

I'm now using an action to create folders in the format

%year% - %album%

With the following expression using Format Value:  
`[$left(%year%,4) -]%album%\%_FILENAME%`

But I also would like to create a folder for Singles, EP's and Albuns automatically, using the following logic:

1-3 songs: Single  
4-6: EP  
7\> Album

That way I'd have a folder structure like this:

> Single/  
> 2019 - Album\_name  
> 2018 - Album\_name  
> EP/  
> 2017 - Album\_name  
> 2016 - Album\_name

How can I do that? Maybe comparing the totaltracks? If totaltracks are igual to those values, I run the command to rename the filename?

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [February 7, 2019, 6:04am UTC](https://community.mp3tag.de/t/how-to-create-a-folder-structure-based-on-number-of-track/44451/2 "2019-02-07T06:04:35Z")

</div>

Brian Eno's "Music for Airports" has just 4 tracks and is an album.  
Mike Oldfield's "Tubular Bells" has just 2 (rather long) tracks and is an album.  
Pink Floyd's "Animals" has 5 tracks and is an album.  
Norah Jones' "Little broken hearts EP" has 7 tracks.

So I would not apply an automatism.

I think the variable would be %\_total\_files%

---

<div class="post-metadata">

**Author:** ![henriquebs12](https://community.mp3tag.de/user_avatar/community.mp3tag.de/henriquebs12/32/8205_2.png) [@henriquebs12](https://community.mp3tag.de/u/henriquebs12)\
**Post date:** [February 7, 2019, 6:20am UTC](https://community.mp3tag.de/t/how-to-create-a-folder-structure-based-on-number-of-track/44451/3 "2019-02-07T06:20:44Z")

</div>

So is there a way I can also sum total length?

I want the same standard iTunes uses, and it depends on the amount of tracks and total length.  
[See here.](https://support.tunecore.com/hc/en-ca/articles/115006689928-What-is-the-difference-between-a-Single-an-EP-and-an-Album-)

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [February 7, 2019, 6:24am UTC](https://community.mp3tag.de/t/how-to-create-a-folder-structure-based-on-number-of-track/44451/4 "2019-02-07T06:24:14Z")

</div>

I do not think that this information is available for an action.  
You would have to export the data, and then use  
`%_total_time%`  
See also  
[https://docs.mp3tag.de/export](https://docs.mp3tag.de/export)

---

<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:27pm UTC](https://community.mp3tag.de/t/how-to-create-a-folder-structure-based-on-number-of-track/44451/5 "2026-02-09T12:27:54Z")

</div>


