# Possible to force track field to be numeric when tagging from text file?

**URL:** https://community.mp3tag.de/t/possible-to-force-track-field-to-be-numeric-when-tagging-from-text-file/64737
**Category:** Support
**Created:** [May 21, 2024, 7:05am UTC](https://community.mp3tag.de/t/possible-to-force-track-field-to-be-numeric-when-tagging-from-text-file/64737 "2024-05-21T07:05:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jplank](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/c5a1d2/32.png) [@jplank](https://community.mp3tag.de/u/jplank)
#### Post date: [May 21, 2024, 7:05am UTC](https://community.mp3tag.de/t/possible-to-force-track-field-to-be-numeric-when-tagging-from-text-file/64737/1 "2024-05-21T07:05:48Z")

</div>

I have a large collection of bootlegs that are mostly untagged. I'm trying to use MP3tag to tag the files as efficiently as possible and wondering if there's a way I could improve upon what I'm currently doing.

Most of the bootlegs I've downloaded are accompanied by a text file describing the contents and listing the tracks. The track listing is often not at the top of the text file. An example is below:

 ![image](https://community.mp3tag.de/uploads/default/original/3X/d/4/d49d3a6c210f054e00edfb34a597a59db4f0a2a3.png)

For something like this, I've been manually copying the tracklisting to a new text document and then using Convert \> Text File - Tag and applying a mask of %track% %title%.

If I skip the step where I copy the tracklisting to a separate file, MP3Tag will attempt to use the first rows in the file and I'll end up with something like this (which is obviously not what I want):

 ![image](https://community.mp3tag.de/uploads/default/original/3X/2/a/2ace4c50af44360496b53a92a9d9656609ffca2d.png)

**My question is: Is there any way to tell MP3Tag that the track field must be numeric and that therefore it should ignore any rows that don't start with a number when applying the mask?** This would enable me to skip the step where I copy the tracklist to a new file, which is manageable for just a few bootlegs but becomes time-consuming when tagging dozens/hundreds of bootlegs.

---

<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: [May 21, 2024, 7:39am UTC](https://community.mp3tag.de/t/possible-to-force-track-field-to-be-numeric-when-tagging-from-text-file/64737/2 "2024-05-21T07:39:01Z")

</div>

> [@jplank](#):
>
> Is there any way to tell MP3Tag that the track field must be numeric

In short: no.  
If you use Convert\>Text file-Tag then the text files has to have the structure of 1 line per record. Each record is terminated by (cr)(lf).  
All other data will lead to problems during the import - as you already found out.

Alternatively, you import the whole text file into a user-defined field in each file and then start processing this field with some more actions to extract the relevant information for that file.

---

<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: [May 21, 2024, 7:42am UTC](https://community.mp3tag.de/t/possible-to-force-track-field-to-be-numeric-when-tagging-from-text-file/64737/3 "2024-05-21T07:42:42Z")

</div>

I don't think, that this is possible with Mp3tag only.

One possibility would be to first extract only the tracklist itself automatically.  
You could use a PowerShell-Commandline like this:  
`foreach ($file in get-Childitem *.txt) {((Get-Content $file.name) | Select-String -Pattern '^\d+.*$' -AllMatches).Matches.Value | Out-File $file-tracks_only.txt}`

This Powershell-Command would loop through all your \*.txt tracklist files in the current directory, extract only the lines starting with a number into a new file with the addition "-tracks\_only.txt". This file would only contain your lines

```auto
1 Intro
...
21 American Girl

```

Maybe then it is easier to use the Convert "Text File -\> Tag"?

Please be aware that this only works if your tracks are the only lines starting with a number.

---

<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:30pm UTC](https://community.mp3tag.de/t/possible-to-force-track-field-to-be-numeric-when-tagging-from-text-file/64737/4 "2026-02-09T12:30:17Z")

</div>


