# Automatic Discnumber tag from Directory Structure

**URL:** https://community.mp3tag.de/t/automatic-discnumber-tag-from-directory-structure/10395
**Category:** Support
**Created:** [May 6, 2010, 10:48am UTC](https://community.mp3tag.de/t/automatic-discnumber-tag-from-directory-structure/10395 "2010-05-06T10:48:39Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Tanku](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/e0b2c6/32.png) [@Tanku](https://community.mp3tag.de/u/Tanku)
#### Post date: [May 6, 2010, 10:48am UTC](https://community.mp3tag.de/t/automatic-discnumber-tag-from-directory-structure/10395/1 "2010-05-06T10:48:39Z")

</div>

Hi guys

I have been using this prog for many years now and got a tidy library.

Problem is I have searched ![:book:](https://community.mp3tag.de/uploads/default/original/1X/0036d5b68f6226c53f6c68abfd0a7b8096fd4505.gif ":book:") high and low and I cannot find a regexp to automatically tag the discnumber from directory structure.

My structure is;

\Artist\Album\Files  
or  
\Artist\Album\CD1,CD2 ect.. CD5 (in some cases)

So I was wondering if there has been any development to check the folder structure to see..

- if there is ..\Album\Files then to just write 1/1 to %discnumber%
- if there is a CD structure to tag up to X amount

e.g.  
CD1  
CD2  
CD3  
CD4

Would write each folder as 1/4,2/4,3/4,4/4 and so on.

It would be nice to have this automatically so I can re-tag all of my collection in one go.

If it makes it easier then would I have to rename ..\Album\Files to ..\Album\CD1??

Hope you can help. Thanks

---

_[View the full topic](https://community.mp3tag.de/t/automatic-discnumber-tag-from-directory-structure/10395)._
