# Renaming folders question

**URL:** <https://community.mp3tag.de/t/renaming-folders-question/57997>\
**Category:** Support\
**Created:** [July 24, 2022, 3:29pm UTC](https://community.mp3tag.de/t/renaming-folders-question/57997 "2022-07-24T15:29:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![johntallen2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/5fc32e/32.png) [@johntallen2](https://community.mp3tag.de/u/johntallen2)\
**Post date:** [July 24, 2022, 3:29pm UTC](https://community.mp3tag.de/t/renaming-folders-question/57997/1 "2022-07-24T15:29:30Z")

</div>

I tried searching for a problem similar to mine, please forgive me if this is a common problem.

 ![image](https://community.mp3tag.de/uploads/default/original/2X/c/c59ce8df51d7c618302308ba443648e42360b387.png)

So I'm trying to rename all folders for this particular artist. I currently tried Tag - Tag Field: \_DIRECTORY and Format String to be: %year% - %album% — %artist%

My problem is that I want everything leading up to the / in my artist field to be removed just for the folder names. I tried the $replace function but in my screenshot you can see that some releases have multiple artists before the slash.

Is there anything that would work?

---

<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:** [July 24, 2022, 3:48pm UTC](https://community.mp3tag.de/t/renaming-folders-question/57997/2 "2022-07-24T15:48:33Z")

</div>

Can you please show us your complete wanted result as an example with your file "1-1 - Cello..." and "1-1 - Arvo Part..."?

Should it be something like  
`1989 - Cello Concerto... — Arvo Part / The Bamberg... .m4a`

---

<div class="post-metadata">

**Author:** ![johntallen2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/5fc32e/32.png) [@johntallen2](https://community.mp3tag.de/u/johntallen2)\
**Post date:** [July 24, 2022, 3:55pm UTC](https://community.mp3tag.de/t/renaming-folders-question/57997/3 "2022-07-24T15:55:34Z")

</div>

The filename is converted correctly, it's converting the %year%, %artist% and %album% to the folder directories for each album. I have the composer(s) as the artists before the forward slash in the artist field which I want to keep, but not when I'm renaming the directories.

For instance, the first album being Cello Concerto, I want the folder directory to look like:  
1989 - Cello Concerto,etc. — The Bamberg Symphony Orchestra, Frans Helmerson, Neeme Jarvi

The second album Trivium:  
1992 - Trivium — Christopher Bowers-Broadbent

---

<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:** [July 24, 2022, 3:58pm UTC](https://community.mp3tag.de/t/renaming-folders-question/57997/4 "2022-07-24T15:58:42Z")

</div>

> [@johntallen2](#):
>
> For instance, the first album being Cello Concerto, I want the folder directory to look like:  
> 1989 - Cello Concerto,etc. — The Bamberg Symphony Orchestra, Frans Helmerson, Neeme Jarvi
> 
> The second album Trivium:  
> 1992 - Trivium — Christopher Bowers-Broadbent

Is this the new wanted directory name?  
Or do you want to divide it into subfolders like

```auto
1989\
     Cello Concertos\
                     The Bamberg Symphony Orchestra, Frans Helmerson, Neeme Jarvi

```

---

<div class="post-metadata">

**Author:** ![johntallen2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/5fc32e/32.png) [@johntallen2](https://community.mp3tag.de/u/johntallen2)\
**Post date:** [July 24, 2022, 4:03pm UTC](https://community.mp3tag.de/t/renaming-folders-question/57997/5 "2022-07-24T16:03:58Z")

</div>

No, just a single directory for each album.  
Final wanted result:  
Arvo Pärt  
Albums  
1989 - Trivium [ECM 1431, 849 655-2] — Christopher Bowers-Broadbent

I just can't figure out how to remove the composers I have listed before Christopher Bowers-Broadbent since it's varies by each album. If it was just Arvo Part it would be easier.

---

<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:** [July 24, 2022, 4:09pm UTC](https://community.mp3tag.de/t/renaming-folders-question/57997/6 "2022-07-24T16:09:58Z")

</div>

> [@johntallen2](#):
>
> %year% - %album% — %artist%

You could try it with this convert Tag -\> Filename ALT + 1  
 ![image](https://community.mp3tag.de/uploads/default/original/2X/8/8e23813fc26b87cd5ce5b2527a374f2ec0f46535.png)  
The regular expression around the ARTIST  
`%year% - %album% — $regexp(%artist%,(.*)\/(.*),$2)`  
works like this:  
Search everything in ARTIST before the first slash and put it into group #1.  
Then search for everything after the first slash and put it into group #2.  
Replace the complete content of ARTIST with the part in group #2.

This does not change your content in the tag ARTIST, the content will only changed for your output.

If you want it as folder, you can add your title after a backslash like this:  
`%year% - %album% — $regexp(%artist%,(.*)\/(.*),$2)\%discnumber%-%track% - %title%`

Please test it carefully, because it really just look for everything BEFORE and AFTER the first slash in your ARTIST tag. If your data does not following this scheme, the regular expression will not produce the expected result!

---

<div class="post-metadata">

**Author:** ![johntallen2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/5fc32e/32.png) [@johntallen2](https://community.mp3tag.de/u/johntallen2)\
**Post date:** [July 24, 2022, 4:18pm UTC](https://community.mp3tag.de/t/renaming-folders-question/57997/7 "2022-07-24T16:18:49Z")

</div>

This worked perfectly! Thank you very much.

---

<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:** [August 23, 2022, 4:19pm UTC](https://community.mp3tag.de/t/renaming-folders-question/57997/8 "2022-08-23T16:19:10Z")

</div>

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