Genre metadata not exporting

HI folks, new to this program but Ive been looking for something like this fopr a long time, glad someone finally assembled it! I am having problems exporting my music folder to a csv file. It seems to put all the metadata in columns just as I ordered them, and the genre field shows up on the mp3tag page just prior to exporting, but when I export it to a csv file, the genre field is missing, there is no column for it. I even did a search on the csb file to find all genre and it finds nothing. ALl the other fields I ask for appear to show up on the CSV. As I'm new I am probably doing something wrong here, Any advice? Thanks

What does the code in your export script look like?
In which field do you store the genre?
Are there several fields of the same type for this data?

HI thanks for the quick reply. I don't klnow what the code looks like, how do I find that? WOuld it be helpful if I attached a few screenshots, one of mp3tag just prior to csv export, and one of the CSV file after I exportd it and opened it? As far as I know there is only the one field for genre. Thanks

A look at the code would be nice.
Use Ctrl-E, open the script that you used with the Edit button and either copy&paste the code to the forum or check it yourself whether you find
%genre%;
somewhere in the code text.
If not, add it.

OK, so here is some background info, along with some attachments that should illustrate what I want to do and what is happening (or not happening) I have a large windows music folder that I want to export to a spreadsheet for editing. For the purposes of brevity, I have created a sample windows folder with 5 mp3 files. Attachment 1 is a screenshot of this windows sample folder

First I clicked on file and then add directory, then selected the path for this windows folder with the 3 mp3 files. The actual fields I want are filename, album artist, album, track, genre, size, and date modified. As my attachment 2 shows, it includes all these attributes at the top. Attachment 2 is a screen snapshot of what MP3 tag displays when I select my folder containing the 5 windows sample files. . Note that the attributes for these mo3 files include the genre field

Then when I select these 5 files and do a do a control e, or a file export, and choose the csv option for export, I am presented with what I think is the code that was requested on this forum. Note that the code includes all the attributes I want EXCEPT for the genre. Somebody suggested I search for %genre,% and if I don’t find it to add it, but I don’t know how or where to add it to this file. Attachment 3 is a screen snapshot of the code, or what is presented when I attempt to export the file to CSV.

Carrying on, if I select all the rows in this spreadsheet, and then click on data and then text to columns, using the semi colon as a delimiter, I wind up with a nice spreadsheet that has all the properties I was looking for, except genre is missing! Attachment 4 is a screen snapshot of the excel output file that I was looking for to edit. It is complete except it is missing the genre field! Unfortunately I am not allowed to upload 3 files to the mp3tag database so I cant attach this, but it is a spreadsheet with all the properties I am looking for except for genre



Maybe I can attach the 4th file here

Try something like this, where I have included genre as one of the tags in my csv export.

$filename(csv,utf-16)Albumartist;Album;Track;TotalTracks;DiscNumber;TotalDiscs;Title;Artist;Year;Composer;Genre;AlbumArtistSort;AlbumSort;TitleSort;ArtistSort;ComposerSort;Grouping;ContentGroup;ItunesKind;Length

$loop(%_filename_ext%)%albumartist%;%album%;%track%;%totaltracks%;%discnumber%;%totaldiscs%;%title%;%artist%;%year%;%Composer%;%genre%;%albumartistsort%;%albumsort%;%titlesort%;%artistsort%;%composersort%;%grouping%;%contentgroup%;%itunesmediatype%;%_length%

$loopend()

Make sure you add or remove matching title and fields. There should be an equal number of each in the csv setup.

I think there was a typo in that field and should not contain the comma.

Thanks for the screenshots and further explanations.
But what you did not include was the code of the export script.
And that is what sets which data gets exported.

As this seems to be a difficult way for you - which functions in your spreadsheet do you need

AFAI can tell there are hardly any superior functions in a spreadsheet that are not covered in MP3tag.
On the contrary: as you do not have to export the data and then re-import it into the tags in MP3tag, you speed up editing a lot and can be sure that the modifications actually end up in the correct files.

I do not see any data in TRACK in Mp3tag. Use the track numbering assistant Ctrl-K to fill that field.

Reply to Ohrenkino-Isn't my file 3 attachment the export script? This is what opened up when I typed in ctrl e at mp3tag. If this is not the export script then please advise how I find the script or how I can send a copy of the code to you? Thanks

I will try your suggestion to get a track number, but I also want to see genre in my final excel sheet, and it doesn't export for some reason

If I don't have to export the file, how do I get mp3tag to take the directpory it displays and put it into a spreadsheet? I thought I needed to esport to a csv, but when I do this with ctrl e, it doesn't bring over the genre field, it is missing from the script, but it does show up on the initial mp3tag screen.

reply to MotleyG-Was I supposed to copy your script into the export script that MP3 creates, or was I supposed to delete the export script and just paste in the one you sent? Thanks

The file list does not have anything to do with a chosen export script.
An export script can be seen and edited after pressing Ctrl-E then select the export script and click on the edit button.
e.g.

$filename(csv,utf-16)Titel;Interpret;Album;Track;Jahr;Länge;Größe;Geändert;Pfad;Dateiname;
$loop(%_filename_ext%)%title%;%artist%;%album%;%track%;%year%;%_length_seconds%;%_file_size%;%_file_mod_date%;%_folderpath%;%_filename_ext%;
$loopend()Erstellt am %_date% mit %_app% - dem universellen Tag Editor - http://www.mp3tag.de/

This script also does not export the genre - but if you modify it to become

$filename(csv,utf-16)Titel;Interpret;Album;Track;Jahr;Genre;Länge;Größe;Geändert;Pfad;Dateiname;
$loop(%_filename_ext%)%title%;%artist%;%album%;%track%;%year%;%genre%;%_length_seconds%;%_file_size%;%_file_mod_date%;%_folderpath%;%_filename_ext%;
$loopend()Erstellt am %_date% mit %_app% - dem universellen Tag Editor - http://www.mp3tag.de/

Then it should do.
This is still something that you have to do locally with a text editor.

It would still be interesting to hear/be told what the spreadsheet does better than MP3tag in respect to editting.
The hustle of the export into a separate file, importing that file into a third party program, editing, saving and then re-importing the data back into MP3tag to get into the original files is a cumbersome procedure.
So: which is the standalone feature that justifies this effort?

Well I can think of a few examples. If I have all my required metadata in a spreadsheet, I can create a table from that spreadsheet and then sort every field or column alphjabetically, or check boxes to display some or all the data in that column (fileter) . Also and this is probably more important for me, I need a way to display all the duplicate files within a windows folder. If I have this data in an excel spreadsheet, I can use a formula in a new column that compares the data in every row of the spreadsheet and ift can show both duplicate song titles for example, and likewise can flag and display this rows with unique titles. Normally I guess a visual inspcection of the windows file can show you this, but when one is dealing with huge lists this becomes a real chore. Can mp3tag do this for me? If it can then maybe I dont need to export to a csv file at all. Thanks

You can do this in MP3tag by clicking on the column header.
If you are not satisfied with the result, you can set a format string including scripting functions to get the sort criteria.

Yes, admittedly, finding duplicates by tag data is not possible with MP3tag - see also this discussion on the drawbacks when using just the tag data to find alleged duplicates:

I doubt that there are duplicates in a folder or at least they have to different in respect to the filename.
So get these, you may apply an action to set the filename with a unifying pattern and see where this fails as it would rename to several files with the same name.
You could then treat these files straightaway in MP3tag.

Sometimes I do have duplicate mp3 titles (not files) within a windows folder. For example I have the song alone by Heart and alone by great white, so I have 2 identical titles, not the same song filename or author, but the same title for a song..

More frequently though I will have a music folder with 1259 mp3 files and another folder with 1263 songs, and both folders should contain the same amount of files. Obviously some are missing from the folder with 1259, but where are they? Which songs are they? Obviously with this many files a visual inspection is not practical. I need a quick way to detect this. If I export the windows file to a csv and then bring that to a formatted spreadsheet using text to columns, I can look for identical titles (or whatever identical data I want to search for) by starting a new excel column with the formula
=IF(COUNTIF($a$3:$a$1263, $A2)>1, "Duplicate title", "Unique title")
Where the range of spngs go from a 2 to a1264. This formula generates an output in each row of either unique or duplicate and in this way I can find my duplicate titles or whatever. I have used mp3tag to do this and it works, The problem is, I want one of the fields in my output excel spreadsheet to be genre, and although genre metadata shows up in the initial windows folder and each song is populated with country, rock, or whatever the genre is, when i do an export (ctrl e) I can get the genre field at the top row of the excel output files but the rows are blank. In other words it is not exporting genres.

Please show us a screenshot of the extended tags dialogue of a single file where you do not get the genre.
Also, please show us the code of the script that you use.

In respect to the 2 folders with different amounts of files:
If the files have identical metadata, then it should be possible to rename the files in both folders with the same naming pattern for the filename.
You could then copy the folder that contains more files to the one with fewer and skip all files where a name conflict arises. This would add only the missing files.

Please show us a screenshot of the extended tags dialogue of a single file where you do not get the genre. OK, I think I know what that is, I have attached it for one of my 5 files in the sameple, but all of them look pretty much the same. Note that the genre field is displayed and populated as "Folk"

Also, please show us the code of the script that you use.
I guess I don't know what you mean. I have already sent an attachment of the page that displays when I type ctrl e from the mp3tag program. I f this is not the code you need to see, then I need detailed instructions please on how to obtain this code
You could then copy the folder that contains more files to the one with fewer and skip all files where a name conflict arises. This would add only the missing files
Yes, but that is assuming the folders are identical except one of the folders is missing 2 of the files. Sometimes the folder with fewer songs not only is missing the files in the other folder, it also has other songs that aren't on the folder with extra files, so in this way addding the missing files wou;dn't fix the problem. I need a way to scompare the 2 fiolders to make sure the mp3 files within them are not only the same number, but identical in their names. Using excel with the unique and duplicate formula does noth of these things. MP3tag will do this for me and it works. The problem is MP3tag is not copying the genre metadata that is displayed in the windows folder over to the CSV, even if I add :genre to the list. The reason I am doiung all this is because I have a large folder with mp3 files on my laptiop, and I then move them onto different media including an mp3 player and some USB thumbs that play in the car. Over tiem though the number of files ion the thumb or mp3 player are different than the number of files in my laptop mp3 folder. SOMetimes its more files, sometimes its less files, and I need a quick way to repair this to make sure I have the identical MP3 songs on my laptop windows folder, my USB drives, and the MP3 player..

Sorry about my pathetic spelling, next time I will spell check before replying