# Editing folder names by tags?

**URL:** https://community.mp3tag.de/t/editing-folder-names-by-tags/59590
**Category:** Support
**Created:** [January 1, 2023, 11:12pm UTC](https://community.mp3tag.de/t/editing-folder-names-by-tags/59590 "2023-01-01T23:12:53Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Nasenschleimhaut](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/c57346/32.png) [@Nasenschleimhaut](https://community.mp3tag.de/u/Nasenschleimhaut)
#### Post date: [January 1, 2023, 11:12pm UTC](https://community.mp3tag.de/t/editing-folder-names-by-tags/59590/1 "2023-01-01T23:12:53Z")

</div>

Hi,

I use the converter to rename files by tags. Is it possible to do the same to folders?

Often I have folders like that: albumname  
I would like to name the folders like that: (year) albumname (xx Tracks)

Thanks in advance and happy new year to everyone!

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [January 2, 2023, 7:04am UTC](https://community.mp3tag.de/t/editing-folder-names-by-tags/59590/2 "2023-01-02T07:04:39Z")

</div>

Have a look in the FAQ:

> [@Converters to rename files or to import tags](https://community.mp3tag.de/t/converters-to-rename-files-or-to-import-tags/8016/2):
>
> How to rename files based on tags? Renaming files, creating folders and complete directory structures from tags can be done by using the [:mt\_ttf:] Converter \> Tag - Filename with a format string. A format string is used to describe the structure of the desired filename. Besides using normal placeholders (such as %artist%, %title%, ...) and arbitrary text (e.g., Music) it also allows for separating folders with the backslash \ character. Here is an example that renames the file based on the t…

You can also use the converter Tag-\>Tag for the pseudo-tagfield `_DIRECTORY`  
Format string: (%year%) %album%

The part of the total tracks of an album depends on which file encoding for the music you use (MP3,  
MP4, FLAC) and which tagfields you have filled.

---

<div class="post-metadata">

### Author: ![Nasenschleimhaut](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/c57346/32.png) [@Nasenschleimhaut](https://community.mp3tag.de/u/Nasenschleimhaut)
#### Post date: [January 2, 2023, 3:42pm UTC](https://community.mp3tag.de/t/editing-folder-names-by-tags/59590/3 "2023-01-02T15:42:41Z")

</div>

Thanks for your helping answer.

As far as I tried it out it works. But as you mentioned the track numbers are a problem.  
Another thing is this creates a new directory and moves the (music)-files there. So all other files stored in the previous directory are left there. Is there a way just to rename the current folders in the directory with those strings?

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [January 2, 2023, 5:45pm UTC](https://community.mp3tag.de/t/editing-folder-names-by-tags/59590/4 "2023-01-02T17:45:06Z")

</div>

> [@Nasenschleimhaut](#):
>
> Another thing is this creates a new directory and moves the (music)-files there. So all other files stored in the previous directory are left there. Is there a way just to rename the current folders in the directory with those strings?

I already wrote the solution for this: Converter Tag-\>Tag for Tagfield `_DIRECTORY.`

I did not write anything special about the totaltracks-part because you wrote nothing till now if you have this information already stored in one of your tagfields. If not you have to create this information before.

---

<div class="post-metadata">

### Author: ![Nasenschleimhaut](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/c57346/32.png) [@Nasenschleimhaut](https://community.mp3tag.de/u/Nasenschleimhaut)
#### Post date: [January 2, 2023, 8:04pm UTC](https://community.mp3tag.de/t/editing-folder-names-by-tags/59590/5 "2023-01-02T20:04:55Z")

</div>

My bad - i should have read more carefully.

Thanks, got it now to work. At least for the year and album part.

Unfortunately I can't figure it out for the total tracks. My track fields are stored with info like 01, 02... or 01/10, 02/10... and so on. I tried the totaltracks and the \_total\_files but ended up with wrong numbering.

($num(%year%,4)) %album% ($num(%totaltracks%,2)) gives me (1987) Die Ärzte) (00)  
($num(%year%,4)) %album% ($num(%\_total\_files%,2)) gives me a total number of all files

What am I missing here?

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [January 2, 2023, 9:47pm UTC](https://community.mp3tag.de/t/editing-folder-names-by-tags/59590/6 "2023-01-02T21:47:42Z")

</div>

> [@Nasenschleimhaut](#):
>
> What am I missing here?

If you show us a screenshot from ALT + T of one of your tracks we can probably better help you.

---

<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: [January 2, 2023, 10:09pm UTC](https://community.mp3tag.de/t/editing-folder-names-by-tags/59590/7 "2023-01-02T22:09:59Z")

</div>

AFAIK TOTALTRACKS is only filled for flac files.  
For all others you have to extract the trainling number from the field TRACK

---

<div class="post-metadata">

### Author: ![Nasenschleimhaut](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/c57346/32.png) [@Nasenschleimhaut](https://community.mp3tag.de/u/Nasenschleimhaut)
#### Post date: [January 2, 2023, 10:17pm UTC](https://community.mp3tag.de/t/editing-folder-names-by-tags/59590/8 "2023-01-02T22:17:25Z")

</div>

Ok, I wanted to take a screenshot and noticed that there's a field called "TRACKTOTAL". I changed ($num(%year%,4)) %album% ($num(%totaltracks%,2)) to ($num(%year%,4)) %album% ($num(%tracktotal%,2)) and now it works but just with FLAC Files. But with mp3 it fails.

---

<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: [January 2, 2023, 10:19pm UTC](https://community.mp3tag.de/t/editing-folder-names-by-tags/59590/9 "2023-01-02T22:19:38Z")

</div>

> [@Nasenschleimhaut](#):
>
> But with mp3 it fails.

Yes, as expected for non-flac files

> [@ohrenkino](#):
>
> you have to extract the trainling number from the field TRACK

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [January 3, 2023, 5:51am UTC](https://community.mp3tag.de/t/editing-folder-names-by-tags/59590/10 "2023-01-03T05:51:40Z")

</div>

> [@Nasenschleimhaut](#):
>
> and now it works but just with FLAC Files. But with mp3 it fails.

As I wrote it differs from the kind of files you have and naturally if the tags-fields are filled properly. A tag-field TOTALTRACKS is used in FLACS, in MP3Tag the total amount of tracks of an album ist stored in the TRACK-field like "1/13". You can create this scheme in MP3s with the autonumbering wizard. So (as Ohrenkino wrote) you have to extract it from there. A tagfield TOTALTRACKS with MP3s would be non standard and so a user-defined field.

> [@Nasenschleimhaut](#):
>
> ($num(%year%,4)) %album% ($num(%\_total\_files%,2)) gives me a total number of all files
> 
> What am I missing here?

%\_total\_files% gives you the number of files that are marked. So if you want to use this you have to go album by album and the albums have to be complete.

---

<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 2, 2023, 5:52am UTC](https://community.mp3tag.de/t/editing-folder-names-by-tags/59590/11 "2023-02-02T05:52:24Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
