# Rename a parent directory for multi-disc albums

**URL:** https://community.mp3tag.de/t/rename-a-parent-directory-for-multi-disc-albums/17514
**Category:** Support
**Created:** [December 30, 2015, 10:30pm UTC](https://community.mp3tag.de/t/rename-a-parent-directory-for-multi-disc-albums/17514 "2015-12-30T22:30:07Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![camelx](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/94ad74/32.png) [@camelx](https://community.mp3tag.de/u/camelx)
#### Post date: [December 30, 2015, 10:30pm UTC](https://community.mp3tag.de/t/rename-a-parent-directory-for-multi-disc-albums/17514/1 "2015-12-30T22:30:07Z")

</div>

For example, I have a Beethoven disc that has 4 discs, so they are 4 CD folders under the parent directory.

I want to do a rename of the parent directory, NOT the current directory of each of the four sub-folders. I begin by right clicking on the parent directory and it loads all the sub folders.

I'd like to keep the sub directories below the main directory.

Beethoven - Piano Sonatas 4, 5, 6  
CD1  
CD2  
CD3  
CD4

My format for \_Directory works great if I want to move all the files to a single directory (current dir), but I'd like to write two directories up. (in the case above, rename the "Beethoven - Piano Sonatas 4, 5, 6 to whatever I want.

I tried with format value with ..\_Directory, but that did not work.

Hopefully I'm missing something obvious!!

Thanks in advance!

---

<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: [December 31, 2015, 9:49am UTC](https://community.mp3tag.de/t/rename-a-parent-directory-for-multi-disc-albums/17514/2 "2015-12-31T09:49:59Z")

</div>

> [@Steve Holiday](#):
>
> ...I tried with format value with ..\_Directory, but that did not work.
> 
> Hopefully I'm missing something obvious!!
> 
> Thanks in advance!

You missed the %.  
..\%\_directory%  
should work

---

<div class="post-metadata">

### Author: ![camelx](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/94ad74/32.png) [@camelx](https://community.mp3tag.de/u/camelx)
#### Post date: [December 31, 2015, 12:57pm UTC](https://community.mp3tag.de/t/rename-a-parent-directory-for-multi-disc-albums/17514/3 "2015-12-31T12:57:35Z")

</div>

![](https://community.mp3tag.de/uploads/default/original/2X/9/912d3159596cd1fb8037ea4a910c5ea24a592d73.JPG)

> [@ohrenkino](#):
>
> You missed the %.  
> ..\%\_directory%  
> should work

Thanks ohrenkino, but that didn't work for me.

I was able to write a "new" folder at the parent dir level, but all I want to really do is "rename" the parent directory, so it carries all the art jpgs, playlists, etc.

I was hoping to have it work like my Format Value, Field: \_Directory, Format String: %year% - %album%, but using \_parent\_directory for field.

Such as: (see screen shot)

that didn't work.

In the past my work flow was to:

1. right click on parent folder which would bring up all files from all CD sub folders for that multi-CD album
2. from tools menu, choose auto numbering and un-check "reset for all subdirs" (this would rename all files from all CDs 01-XX, where XX would be the total number of tracks from all CDs)
3. then I would use my rename directory (\_Directory) - like above and it would rename my parent directory, and put all the files in that single directory ( this was fine due to auto numbering step above)

* * *

I don't HAVE to get this working, as my process above works fine. It just seems that I should be able to rename the parent directory and keep the sub folders of the CD without having to write the absolute filename with \_Filename, etc.

Thanks for your considerations

![](https://community.mp3tag.de/uploads/default/original/2X/9/912d3159596cd1fb8037ea4a910c5ea24a592d73.JPG)

---

<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: [December 31, 2015, 4:24pm UTC](https://community.mp3tag.de/t/rename-a-parent-directory-for-multi-disc-albums/17514/4 "2015-12-31T16:24:58Z")

</div>

Rename the filename instead. (\_FILENAME)

Example Formatstring: %album%\%\_directory%\%\_filename%

---

<div class="post-metadata">

### Author: ![camelx](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/94ad74/32.png) [@camelx](https://community.mp3tag.de/u/camelx)
#### Post date: [December 31, 2015, 5:42pm UTC](https://community.mp3tag.de/t/rename-a-parent-directory-for-multi-disc-albums/17514/5 "2015-12-31T17:42:59Z")

</div>

Poster

Thanks Bud, that works better than anything I've tried yet!! Not exactly what I wanted, as it creates that directory as a new sub directory under the original parent. BUT - it has the new dir name like I want and in that directory it has all the original sub dirs of the multiple CD albums, each containing the original files! So all I have to do now is grab that and move it to my music collection.

Excellent my friend!

Again, I wish I could just have it "rename" my original parent directory, with all the CD sub directories and the playlists, art files and any art sub directories. But all I have to do is just move them into it now and I'm okay.

Thanks again, I learned something new from you today. Much appreciated and I'll use that until I find a way to just rename the parent so it has all the CD sub directories and other supporting files - one day.

Cheers! Happy New Year.

---

<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 1, 2016, 10:43am UTC](https://community.mp3tag.de/t/rename-a-parent-directory-for-multi-disc-albums/17514/6 "2016-01-01T10:43:48Z")

</div>

> [@Steve Holiday](#):
>
> Thanks Bud, that works better than anything I've tried yet!! Not exactly what I wanted, as it creates that directory as a new sub directory under the original parent. BUT - it has the new dir name like I want and in that directory it has all the original sub dirs of the multiple CD albums, each containing the original files! So all I have to do now is grab that and move it to my music collection.

My example shopuld not do create a subdirectory but create a new parent-directory on the same level.  
Anyway you can define an absolute path to the folder of your music collection, if you want to move it the files anyway:  
Example Formatstring: E:\<i\>Path to my music collection\%album%\%\_directory%\%\_filename%

The disadvantage of renaming the files instead of the parent-dircetory is that only marked **music** -files will be moved to the new path and an empty directory is left behind.

> [@](#):
>
> Again, I wish I could just have it "rename" my original parent directory,

Obviously it is not possible to rename the parent-directory with an action.  
But I think it is possible to do this with external commands from a batch-file, which can be added to the tools menue.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [January 1, 2016, 3:54pm UTC](https://community.mp3tag.de/t/rename-a-parent-directory-for-multi-disc-albums/17514/7 "2016-01-01T15:54:22Z")

</div>

> [@Steve Holiday](#):
>
> For example, I have a Beethoven disc that has 4 discs, so they are 4 CD folders under the parent directory. I want to do a rename of the parent directory, NOT the current directory of each of the four sub-folders. ...

**Rename the folder, which is one level above the folder, which contains the tracks. Action "Format value" ... oder ... Convert "Tag-Tag" Field: \_DIRECTORY Formatstring: %\_folderpath%'..\..\Folder New\'%\_directory%**

See also ...  
[/t/10728/1](https://community.mp3tag.de/t/10728/1)  
[/t/16957/1](https://community.mp3tag.de/t/16957/1)

DD.20160101.1754.CET

---

<div class="post-metadata">

### Author: ![angangang](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/898d66/32.png) [@angangang](https://community.mp3tag.de/u/angangang)
#### Post date: [February 28, 2016, 1:15am UTC](https://community.mp3tag.de/t/rename-a-parent-directory-for-multi-disc-albums/17514/8 "2016-02-28T01:15:07Z")

</div>

Hello,

I'm really confused by this :

Field: \_DIRECTORY  
Formatstring: %\_folderpath%'....\Folder New'%\_directory%

I have for example this album structure :  
bach\_brandenburg\_concertos  
bach\_brandenburg\_concertos01  
Brandenburg Concerto No. 1 in F major, BWV1046 I , Allegro.m4a  
bach\_brandenburg\_concertos02  
Brandenburg Concertos No. 5 in D major, BWV1050 Affettuoso.m4a

Whith these tags :  
Artist : J.S Bach  
Album : Bradenburg Concertos 1-6  
Conductor : Benjamin Britten  
Year : 2001

Hello,

I would like to rename the folders like this :  
J.S. Bach - [Benjamin Britten] - Bradenburg Concertos 1-6 - 2001 - 2CD  
CD1  
01 - Brandenburg Concerto No. 1 in F major, BWV1046 I , Allegro.flac  
...  
CD2  
01 - Brandenburg Concertos No. 5 in D major, BWV1050 Affettuoso.flac  
...

I have tried this action :

Format value "\_FILENAME":  
$if2(%albumartist%,%artist%)[- '[$if2(%conductor%,%conductor%)]'] - %album% - $if(%year%,[%year%],!!!)[CD$if(%discnumber%,%discnumber%,)]\%track% - %title%

And i have tried without success...  
Formatstring: %\_folderpath%'....\Folder New'%\_directory%

I woiuld need something like  
%foldername% (track parent)  
%foldername2% (parent of track parent)  
%foldername3% (...)

Thank you for you help,  
Kindest regards

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [February 28, 2016, 5:23am UTC](https://community.mp3tag.de/t/rename-a-parent-directory-for-multi-disc-albums/17514/9 "2016-02-28T05:23:51Z")

</div>

> [@angangang](#):
>
> Hello, I'm really confused ...

Please take into account ...  
1.  
Your request is something different from the theme of this thread.  
2.  
You cannot change the encoding type of a music file from 'm4a' to 'flac' by simple renaming.  
You have to recode the music file from type M4A to FLAC.  
3.  
You want to apply these values ...  
%ALBUM%  
%ARTIST%  
%CONDUCTOR%  
%YEAR%  
%ALBUMARTIST%  
%DISCNUMBER%  
%TITLE%  
%TRACK%  
You have these values ...  
%ALBUM%  
%ARTIST%  
%CONDUCTOR%  
%YEAR%  
... it lacks a few.  
4.  
You want to apply ...  
Format value "\_FILENAME":  
$if2(%ALBUMARTIST%,%ARTIST%)[' - ['$if2(%CONDUCTOR%,%CONDUCTOR%)']']' - '%ALBUM%' - '$if(%YEAR%,'['%YEAR%']','!!!')'[CD'$if(%DISCNUMBER%,%DISCNUMBER%,)']'%TRACK%' - '%TITLE%  
You can use the function $if2 ...  
to prevent your formatstring from using non existing values ...  
and return an alternative value:  
$if2(%ALBUMARTIST%,%ARTIST%) ... returns %ALBUMARTIST% or %ARTIST%  
$if2(%CONDUCTOR%,) ... returns %CONDUCTOR% or nothing  
$if2(%DISCNUMBER%,) ... returns %DISCNUMBER% or nothing  
You can write some parts within your formatstring in another way:  
$if2(%CONDUCTOR%,%CONDUCTOR%) --\> $if2(%CONDUCTOR%,)  
$if(%YEAR%,'['%YEAR%']','!!!') --\> $if2('['%YEAR%']','!!!')  
$if(%DISCNUMBER%,%DISCNUMBER%,) --\> $if2(%DISCNUMBER%,)

DD.20160228.0723.CET

---

<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:26pm UTC](https://community.mp3tag.de/t/rename-a-parent-directory-for-multi-disc-albums/17514/10 "2026-02-09T12:26:01Z")

</div>


