Remove tags (CLI)

Hello, I want to remove tags from all media in a directory by command line the same way the GUI removes tags. Does anyone know how to do this?

MP3Tag has no command line options for tag manipulation.
But there are other command line tools that can do the job.
One of the most flexible is ExifTool by Phil Harvey.

Sadly that looks even more complex. Mp3tag's gui to remove the data works perfect. I wanted to automate the mp3tag's remove tags on a directory and it's sub files that is often changing.

It seems that ExifTool does not write to ID3V2. So my memory was wrong.
Perhaps you find somthing here thats suits your purpose.

People have different opinions of what they call "automatic".
One cannot assess the level of knowledge about MP3Tag very well, especially from first posters.

So just to be sure. You know that you can load folders with subfolders into Mp3Tag and that tasks can be started via defined actions, including deleting tags, of course?

so for example what i am looking to do it something like i have sketched out below. This will run in a batch file or whatever to auto clean the meta data from all files and subfiles in a directory every set amount of time so i basically just need to run that one batch file and let it run forever.

start loop
run mp3tag
directory "c:\cleanme"
remove all metadata (the same way the gui does)
wait 60mins
goto start

id3mtag is in the right direction but only supports mp3 files. I am primarily cleaning .mp4 and .m4v

Think i maybe found a solution will have to do some testing with a program called TAG from 2003

Alright fellas after looking into the scripting and auto loading folders with mp3tag I wasn't successful and getting it to do what I need. I did some searching and found a CLI called TAG I was trying my best to get TAG working but wasn't able to so I checked out the exiftool some more and after some trial and error I may have it running as intended.

This has errors and doesn't work
C:\Users\encoder\Desktop\test\Tag.exe --removeid3v2 --nocheck --recursive C:\Users\encoder\Desktop\test\set0*.mp4

Works but clears out mp4 tag for the file
C:\Users\encoder\Desktop\test\exiftool.exe -all = C:\Users\encoder\Desktop\test\set0\easternsunrise1999.06.08\easternsunrise1999.06.08.mp4

Works perfect for single file
C:\Users\encoder\Desktop\test\exiftool.exe -comment""= -title""= C:\Users\encoder\Desktop\test\set1\easternsunrise1999.06.08\easternsunrise1999.06.08.mp4

Works perfect to put in batch file loop
C:\Users\encoder\Desktop\test\exiftool.exe -comment""= -title""= C:\Users\encoder\Desktop\test\set3*

Final working script
:cleantime
C:\Users\encoder\Desktop\test\exiftool.exe -comment""= -title""= C:\Users\encoder\Desktop\test\set4*
timeout /t 60
goto cleantime

After testing the above script some more I noticed it was spitting out errors for other files in the directories which could lead to problems if it's cleaning or trying to clean something I don't want it to. Below is an updated version that will only do the specified extension type. Also I found out the above script was creating an "original" copy of the file. There is also a command to void this which I added to the script below. Also if there was a file in the root directory it would only clean that file and not check the folders within the specified root directory. This was fixed with the -r to search all folders and filed in the specified directory.

Thanks everyone for the help

------- The final as of now ----------

:cleantime
C:\Users\encoder\Desktop\test\exiftool.exe -comment""= -title""= C:\Users\encoder\Desktop\test* -r -ext mp4 -overwrite_original
timeout /t 60
goto cleantime

Thank you for your solution @nyxtyr

Could you confirm that exiftool.exe only remove tags for .MP4 tracks, still not for .MP3?

Take a look at the table and the "Support" column:
https://exiftool.org/#supported

I tried it once and got the message:
Error: Writing of MP3 files is not yet supported

I asked him to be sure that other readers finding this thread thanks to Google see that his solution works fine for .MP4, but not for .MP3.

The linked page says for exiftool v12.22 from 17.03.2021:

ExifTool can Read, Write and/or Create files in the following formats. Also listed are the support levels for EXIF, IPTC, XMP, ICC_Profile and other metadata types for each file format.

File Type Support Description EXIF IPTC XMP ICC Other
MP3 R MPEG-1 layer 3 audio - - - - R MPEG ID3 Lyrics3 APE
MP4 R/W Motion Picture Experts Group version 4 (QuickTime-based) R/W3 R/W3 R/W/C - R/W/C QuickTime

This is correct I put several different file types listed below in multiple random directories I ran the script on. It only modified the tags of the .mp4 files due to the -ext mp4. I have not tried to use it on any other file types yet other than the mp4s.

.mp4
.m4v
.png
.pdf
.jpg
.gif
.flac
.mpeg
.mp3
.mkv
.iso
.zip
.rar
.exe
.txt

I currently ran into a issue or i guess it would be more of something i prefer not to happen. If the file has no tags it still opens it and processes it to remove the tags as if it had tags. I need to find a way to do a if tag exists clear tag if not then continue on to the next file.

You could try to use the exiftool -if condition.

The -if command seems rather complex so I started a forum thread over there @here to maybe get some help on it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.