# Rename subfolders for discs for multi-disc compilations

**URL:** https://community.mp3tag.de/t/rename-subfolders-for-discs-for-multi-disc-compilations/64400
**Category:** Support
**Created:** [April 14, 2024, 2:22am UTC](https://community.mp3tag.de/t/rename-subfolders-for-discs-for-multi-disc-compilations/64400 "2024-04-14T02:22:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sjkiss](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sjkiss/32/15612_2.png) [@sjkiss](https://community.mp3tag.de/u/sjkiss)
#### Post date: [April 14, 2024, 2:22am UTC](https://community.mp3tag.de/t/rename-subfolders-for-discs-for-multi-disc-compilations/64400/1 "2024-04-14T02:22:03Z")

</div>

I would like to modify the script [here](https://community.mp3tag.de/t/move-files-to-directory-artist-year-album/16677) (or something like this) to account for the fact that sometimes I have multi-disc compilations. I'd like each disc in its own subfolder e.g. /albumartist/album/disc1/tracks.

how do I modify this so that if the discnumber is greater than one, then add the disc number as a subfolder, but if it is less than two, ignore it.

---

<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: [April 14, 2024, 6:06am UTC](https://community.mp3tag.de/t/rename-subfolders-for-discs-for-multi-disc-compilations/64400/2 "2024-04-14T06:06:21Z")

</div>

> [@sjkiss](#):
>
> how do I modify this so that if the discnumber is greater than one, then add the disc number as a subfolder, but if it is less than two, ignore it.

This would mean that if you have disc 1/2 the files would stay in the top folder but those for disc 2/2 would be moved to the subordinate folder?

---

<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: [April 14, 2024, 6:11am UTC](https://community.mp3tag.de/t/rename-subfolders-for-discs-for-multi-disc-compilations/64400/3 "2024-04-14T06:11:08Z")

</div>

Filter for the files that have a fitting discnumber.  
Then try the format string:  
`%albumartist%\%album%\%discnumber%\%title%`

If you have filled the discnumber only for albums where there are more than 1 disc and left it out for single disc albums, then you could leave out the filter and try:  
`%albumartist%\%album%\[%discnumber%\]%title%`

---

<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: [May 16, 2024, 8:32am UTC](https://community.mp3tag.de/t/rename-subfolders-for-discs-for-multi-disc-compilations/64400/4 "2024-05-16T08:32:11Z")

</div>

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