# Create action field based on length and files

**URL:** <https://community.mp3tag.de/t/create-action-field-based-on-length-and-files/61115>\
**Category:** Support\
**Created:** [May 29, 2023, 6:47pm UTC](https://community.mp3tag.de/t/create-action-field-based-on-length-and-files/61115 "2023-05-29T18:47:59Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [May 30, 2023, 9:18am UTC](https://community.mp3tag.de/t/create-action-field-based-on-length-and-files/61115/4 "2023-05-30T09:18:01Z")

</div>

Something very similar has been discussed in this thread:

> [@How to create a folder structure based on number of track](https://community.mp3tag.de/t/how-to-create-a-folder-structure-based-on-number-of-track/44451):
>
> 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 to…

including some pieces that would create strange results when treated automatically.

As a first approach: if you have the files in separate folders, then you could run the track numbering wizard to include the totals and then check the total number of files as stored in the field TRACK.  
You could filter or check these numbers and then apply the action to fill the relieasetype (which is a user-defined field anyway and will not be picked up by most players - MEDIATYPE would come closest, I think)  
The length, though, will not be included

---

_[View the full topic](https://community.mp3tag.de/t/create-action-field-based-on-length-and-files/61115)._
