# Disk ID as a variable

**URL:** https://community.mp3tag.de/t/disk-id-as-a-variable/14918
**Category:** General Discussion
**Created:** [July 22, 2013, 1:05pm UTC](https://community.mp3tag.de/t/disk-id-as-a-variable/14918 "2013-07-22T13:05:47Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![grndvu](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/9d8465/32.png) [@grndvu](https://community.mp3tag.de/u/grndvu)
#### Post date: [July 22, 2013, 1:05pm UTC](https://community.mp3tag.de/t/disk-id-as-a-variable/14918/1 "2013-07-22T13:05:47Z")

</div>

A rookie question ... answer wasn't directly found in FAQ/Forums:

In Filename--\>Filename: How to make Disk ID a variable that reads from Path ... see attached image. Something to do with the backslash!?

Able to otherwise parse file name satisfactorily.

Thx.

 ![](https://community.mp3tag.de/uploads/default/original/2X/b/bfced365b16483e6679b283bf39d882bdea6dccc.jpg)

---

<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: [July 22, 2013, 4:44pm UTC](https://community.mp3tag.de/t/disk-id-as-a-variable/14918/2 "2013-07-22T16:44:46Z")

</div>

> [@PBH](#):
>
> A rookie question ... answer wasn't directly found in FAQ/Forums:
> 
> In Filename--\>Filename: How to make Disk ID a variable that reads from Path ... see attached image. Something to do with the backslash!?
> 
> Able to otherwise parse file name satisfactorily.
> 
> Thx.

I do not see any disk id in the path... could you give a concrete example that shows the name before and afterwards?  
(Also: instead of messing around with the filename only it is much more advisable to fill the tags and then build the filename from them).

---

<div class="post-metadata">

### Author: ![grndvu](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/9d8465/32.png) [@grndvu](https://community.mp3tag.de/u/grndvu)
#### Post date: [July 23, 2013, 2:44pm UTC](https://community.mp3tag.de/t/disk-id-as-a-variable/14918/3 "2013-07-23T14:44:50Z")

</div>

> [@ohrenkino](#):
>
> I do not see any disk id in the path... could you give a concrete example that shows the name before and afterwards?  
> (Also: instead of messing around with the filename only it is much more advisable to fill the tags and then build the filename from them).

Well, "Disk5A" just after "English language" is the disk id. Wasn't able to include it in the file re-naming as a variable, so this id was expressed as a constant and manually changed with the stepping through of each disk directory.

Will try to find what "fill the tags" means in the Help/Forums.

Thx.

---

<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: [July 23, 2013, 3:14pm UTC](https://community.mp3tag.de/t/disk-id-as-a-variable/14918/4 "2013-07-23T15:14:04Z")

</div>

> [@PBH](#):
>
> Well, "Disk5A" just after "English language" is the disk id. Wasn't able to include it in the file re-naming as a variable, so this id was expressed as a constant and manually changed with the stepping through of each disk directory.
> 
> Will try to find what "fill the tags" means in the Help/Forums.
> 
> Thx.

Thank you.

If you modify the original mask  
%1-%2\_%3  
to  
%4\%1-%2\_%3  
and the New Filename pattern to:  
%4-Track %1-%2

then you get the Disk05A into the filename.

---

<div class="post-metadata">

### Author: ![grndvu](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/9d8465/32.png) [@grndvu](https://community.mp3tag.de/u/grndvu)
#### Post date: [July 23, 2013, 4:59pm UTC](https://community.mp3tag.de/t/disk-id-as-a-variable/14918/5 "2013-07-23T16:59:10Z")

</div>

> [@ohrenkino](#):
>
> Thank you.
> 
> If you modify the original mask  
> %1-%2\_%3  
> to  
> %4\%1-%2\_%3  
> and the New Filename pattern to:  
> %4-Track %1-%2
> 
> then you get the Disk05A into the filename.

=======

Please bear with this new user.

Using both the "original mask" and "new filename pattern" suggested (above) yields no opportunity to finish the Filename--Filename conversion (see attached image Mp3Tag\_A)

Did try putting the "\%4" at the _end_ of the original mask. Conversion was accomplished but what was pulled in to the beginning of the filename was the Title (see attached image Mp3Tag\_B)

FWIW - Should mention that the submitted images all depict the filenames of tracks 1 & 2 converted my "old" way. Track 3 is the first that hopefully could be converted with the disk id pulled in to the beginning of the filename.

![](https://community.mp3tag.de/uploads/default/original/2X/a/ae51378174547e764be1aa068832147c3f546f97.jpg)

![](https://community.mp3tag.de/uploads/default/original/2X/7/778169d07790a2ca851f7e8434a574eb2d77dda9.jpg)

---

<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: [July 23, 2013, 5:13pm UTC](https://community.mp3tag.de/t/disk-id-as-a-variable/14918/6 "2013-07-23T17:13:38Z")

</div>

I cannot see a backslash anywhere in the masks you entered (the solution you picked makes it very hard to decipher). So these attempts were bound to fail.

if you have a look at a fully qualified filename then it consists of a path part and the filename part.  
Mp3tag starts to interpret the filename starting at then end.  
You can add a name part that is separated from the filename by the backslash.  
The mask I offered you had a a %4 before the backslash \ and your original mask %1-%2\_%3 behind it.  
The complete mask for a filename plus the first folder name then looks like this:  
%4\%1-%2\_%3  
or if you like the parameters tidied up  
%1\%2-%3\_%4

%1 now stands for DISK5A.  
Please try the mask with the backslash.

---

<div class="post-metadata">

### Author: ![grndvu](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/9d8465/32.png) [@grndvu](https://community.mp3tag.de/u/grndvu)
#### Post date: [July 24, 2013, 1:22pm UTC](https://community.mp3tag.de/t/disk-id-as-a-variable/14918/7 "2013-07-24T13:22:32Z")

</div>

Switched gears somewhat.

Opted for Tag-Filename conversion option and used ...

%\_directory% - Track $num(%track%,2)

... to get what was needed. Probably never adequately described the exact conversion desired.

Thanks for hanging in there with me.
