# Copy tag from one track to empty field on another track

**URL:** https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129
**Category:** Support
**Created:** [October 2, 2024, 9:49am UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129 "2024-10-02T09:49:09Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![mamema](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@mamema](https://community.mp3tag.de/u/mamema)
#### Post date: [October 2, 2024, 9:49am UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/1 "2024-10-02T09:49:09Z")

</div>

...search the forum but didn't find a solution.  
This is NOT the usual copy value question.

I have a TAG %LABEL% which is not filled out on every track in the album.  
So i look for a BATCH solution to copy the filled out value from one track to the other tracks which do not have this value.

filtering for "empty value" is not a solution, as i do not know the value for the empty fields, as the value should come from an "neighbour track" from same album

Any hints?

---

<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: [October 2, 2024, 9:51am UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/2 "2024-10-02T09:51:33Z")

</div>

> [@mamema](#):
>
> Any hints?

There is no Action like "copy from neighbour track".  
What you can do is to select a "source track" containing your %LABEL% content.  
Then manually copy this content from View -\> Extended Tags  
Select one or multiple "target tracks".  
Then manually paste the value into this selected tracks in View -\> Extended Tags.

---

<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: [October 2, 2024, 9:58am UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/3 "2024-10-02T09:58:45Z")

</div>

Just a simple remark

> [@mamema](#):
>
> filtering for "empty value" is not a solution

There is no such thing like "empty value".  
A tag only exists WITH content.  
Otherwise it does not exist at all.  
There is no tag without content.

---

<div class="post-metadata">

### Author: ![mamema](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@mamema](https://community.mp3tag.de/u/mamema)
#### Post date: [October 2, 2024, 10:34am UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/4 "2024-10-02T10:34:52Z")

</div>

okay, so no batch solution? Extended tagging isn't batch....  
Is it allowed to ask here for "other" non mp3tag solutions, perhaps?

---

<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: [October 2, 2024, 10:38am UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/5 "2024-10-02T10:38:49Z")

</div>

I think there are 2 approaches:  
1st: create a corresponding field in the tag panel, select all the files that should get the same data for %LABEL%, enter the data in the field in the tag panel, save the modification.

2nd: filter for all the files that have the LABEL filled. Provided that files in the same folder should get the same data in LABEL, filter for files that have already data in LABEL (%LABEL% PRESENT), then rename the folder with  
Convert\>Tag-Tag for \_DIRECTORY  
Format string: %\_directory% \_\_%label%  
Now filter for the files without LABEL  
%label% MISSING  
Use Convert\>Filename-Tag  
Format string: `%dummy%__%label%\%dummy%`  
to import the data from the folder name.  
Later, you could rename the folders again with  
Convert\>Tag-Tag for \_DIRECTORY  
Format string: `$regexp(%_directory%,(.*)__.*,$1)`

---

<div class="post-metadata">

### Author: ![mamema](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@mamema](https://community.mp3tag.de/u/mamema)
#### Post date: [October 2, 2024, 10:42am UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/6 "2024-10-02T10:42:58Z")

</div>

thanks, as solution 2 is to intrusive for a lot of directories, i'm hesitate to use it, but made me think.  
Is it possible to batch export (into album directory) and then batch import from that file again?  
Perhaps before import batch modify the exported files to strip / add some data....

---

<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: [October 2, 2024, 11:33am UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/7 "2024-10-02T11:33:10Z")

</div>

You could write an export script to export the contents of LABEL,  
then use

> **[Import Text File – Mp3tag Documentation](https://docs.mp3tag.de/actions/import-text/)**
>
> Documentation on the Import Text File action type that can be performed as Quick Action or as reusable workflow from Action Groups. Mp3tag is the universal Tag Editor.

As we are discussing the whole affair on a fairly theoretical level:  
How often in the lifetime of a file will this problem arise?

Could user-defined values for a tag-field help?

> [@Add custom user-defined Genres](https://community.mp3tag.de/t/add-custom-user-defined-genres/61122):
>
> Add and Edit user-defined Genres via Custom List Values Every field on the Tag Panel can have custom values added to its drop-down list. These can be customized via [Options → Tag Panel](https://docs.mp3tag.de/customization/tag-panel/) and the Genre field is no exception. You can use Options → Tag Panel → Genre → Custom list values → Manage... to edit the list of custom Genres and also hide the standard genres, if you prefer your own. The following screenshot exemplifies the process: Import and Export of Custom Lis…

---

<div class="post-metadata">

### Author: ![mamema](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@mamema](https://community.mp3tag.de/u/mamema)
#### Post date: [October 2, 2024, 11:42am UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/8 "2024-10-02T11:42:55Z")

</div>

> [@ohrenkino](#):
>
> As we are discussing the whole affair on a fairly theoretical level:  
> How often in the lifetime of a file will this problem arise?

as i'm fixing my discogs / musicbrainz tagging, honestly quite a lot.  
Thanks look into your proposed solution

user defined fields won't help as i do not know the values upfront.  
I've tested the export/import suggestions. This also doesn't work for me, as the values in the export file are track based.  
Means: if i have an album of 8 tracks, i need 8 values. I do not found a way to import  
1 value to 8 files at once.

As i have for example 8 files but only 4 values, i have an eight line export file with 4 lines with values and 4 empty lines  
Import back to the files leads then to the proposed outcome, 4 with values, 4 with no values

---

<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: [October 2, 2024, 1:36pm UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/9 "2024-10-02T13:36:30Z")

</div>

> [@mamema](#):
>
> Means: if i have an album of 8 tracks, i need 8 values. I do not found a way to import  
> 1 value to 8 files at once.

Have you tried it?  
As the referenced action does exactly that: add the contents of the text file to the specified field in each of the selected files.  
You do not need e.g. 8 values

---

<div class="post-metadata">

### Author: ![mamema](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@mamema](https://community.mp3tag.de/u/mamema)
#### Post date: [October 2, 2024, 1:51pm UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/10 "2024-10-02T13:51:56Z")

</div>

yes tried first, wasn't working. tried again, had partly a success, so first was an user error i guess, but i'm not there yet completely

My export file

* * *

$filename(New export file.txt,utf-8)  
$loop(%track%)  
%label%  
$loopend()

but the tag gets filled with spaces in the beginning and at the end, so the value seems centric.  
Looks like:(forget the ")  
" My Label. "  
should be  
"My label"

the existing value has no spaces. Only after import

used the quick action import text file

---

<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: [October 2, 2024, 1:57pm UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/11 "2024-10-02T13:57:23Z")

</div>

You do not tell on which files you use your export.  
If you use it on files that do not have the field LABEL, then you get empty lines.  
As the referenced function imports all of the text file into the named field this might appear as spaced.

The export script should be used only on files that have data in the field LABEL - and preferably feature only a single line.

---

<div class="post-metadata">

### Author: ![mamema](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@mamema](https://community.mp3tag.de/u/mamema)
#### Post date: [October 2, 2024, 2:14pm UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/12 "2024-10-02T14:14:37Z")

</div>

i've filtered with LABEL PRESENT

but i still get exported files (with the above config)  
which look like  
this is an empty line  
this is an empty line  
Label

or on another album  
this is an empty line  
Label  
this is an empty line  
Label  
this is an empty line  
Label

something wrong with CR/LF at the end i guess....

---

<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: [October 2, 2024, 2:37pm UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/13 "2024-10-02T14:37:36Z")

</div>

It is the "feature" of export scripts that the number of lines in the export script is also reflected in the script's output.  
Try go get the code into a single line and only the number of line breaks that you want to see in the data.  
(Wouldn't renaming the folders be easier?)

---

<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: [October 2, 2024, 3:02pm UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/14 "2024-10-02T15:02:06Z")

</div>

@mamema As it seems that you are no longer fixated on a batch solution:

> [@mamema](#):
>
> i've filtered with LABEL PRESENT

it would be much easier to use @ohrenkino's first solution with the [Tag Panel](https://docs.mp3tag.de/getting-started/main-window/#tag-panel) and its [customization](https://docs.mp3tag.de/customization/tag-panel/) with your LABEL tag.

---

<div class="post-metadata">

### Author: ![mamema](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@mamema](https://community.mp3tag.de/u/mamema)
#### Post date: [October 2, 2024, 3:29pm UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/15 "2024-10-02T15:29:12Z")

</div>

> (Wouldn't renaming the folders be easier?)  
> no, as this would kick off a huge backup of my files.  
> mp3tag can tag files without changing file properties, so i can prevent that.  
> Woohoo! The export file on one line did the trick  
> mp3tag is allmighty!  
> Unfortunately i've still not found the Action "Pay my bills"

---

<div class="post-metadata">

### Author: ![mamema](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@mamema](https://community.mp3tag.de/u/mamema)
#### Post date: [October 2, 2024, 3:32pm UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/16 "2024-10-02T15:32:41Z")

</div>

> As it seems that you are no longer fixated on a batch solution:

what lead you to that conclusion?  
The batch approach still works  
I've just need to export my stuff into files per folder (have album per folder) like so:

1. Filter LABEL PRESENT  
2 export with path %\_folderpath%\00 csv tag dump of label.csv  
3 import with path %\_folderpath%\00 csv tag dump of label.csv

this is not possible with the tag panel

---

<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: [October 2, 2024, 3:34pm UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/17 "2024-10-02T15:34:07Z")

</div>

What exactly do you manually change in the  
`00 csv tag dump of label.csv`  
between step #2 and #3?

---

<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: [October 2, 2024, 3:35pm UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/18 "2024-10-02T15:35:02Z")

</div>

I think you are missing a manual change of filter or removal of filter between steps 2 & 3.

---

<div class="post-metadata">

### Author: ![mamema](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@mamema](https://community.mp3tag.de/u/mamema)
#### Post date: [October 2, 2024, 3:35pm UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/19 "2024-10-02T15:35:50Z")

</div>

yes, removing filter, you both were to fast before i can edit my post

---

<div class="post-metadata">

### Author: ![mamema](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/8baadc/32.png) [@mamema](https://community.mp3tag.de/u/mamema)
#### Post date: [October 2, 2024, 3:48pm UTC](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129/20 "2024-10-02T15:48:42Z")

</div>

even though working as @ohrenkino suggests that only one file with tag should be exported  
can the LABELS PRESENT filter be adapted, something along the lines: if one file with label from this album is listed, stop with this album listing files

[Next page](https://community.mp3tag.de/t/copy-tag-from-one-track-to-empty-field-on-another-track/66129.md?page=2)
