Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Batch tag editor for cue sheets (Read 2133 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Batch tag editor for cue sheets

Hi everyone,
Over the time, i have built a very large digital music collection. Recently, i realized that i have quite a number of unwanted comments ("REM COMMENT "") in my cue sheets, which are interfering with the management of my music.

Therefore, i was wondering weather someone would know a program which would allow me to erase the comments of many cuesheets at a time, a little bit like Mp3tag does for embedded tags. I insist on the batch aspect, as doing one at a time would take me weeks, doing it full time.

Thanks

Nico

Re: Batch tag editor for cue sheets

Reply #1
I think that a way is using Notepad++ and a regular expression to search and replace the comments.

Search:
(REM COMMENT ".*")

Replace with nothing.

This search can be done for a folder and its subfolder,  but before anything I recommend to try it with some test files before doing anything to check is correct.

Re: Batch tag editor for cue sheets

Reply #2
The function of REM is to add tags to a CUE sheet that are not supported by the CUE standard but can be read by media players. What you need is a media player that read/write these tags.
Maybe if you use a media player like MusicBee of Foobar you can select the entire column containing the Comments and clear it at once. If this not only affects the database of the media player but is written to the cue-sheets as well, your problem is solved in an easy way.

You might also have a look at typical CUE sheet editors, maybe they can open a bunch of CUE sheets at the time: http://www.thewelltemperedcomputer.com/SW/CueSheet_SW.htm

If not, you need a true programming language say R ( https://www.r-project.org/)
This allows you to loop through files and alter the content e.g. delete any line starting with REM COMMENT
However, learning curve probably a bit long and steep.
TheWellTemperedComputer.com

Re: Batch tag editor for cue sheets

Reply #3
It can be done with a one-liner:
Code: [Select]
find . -type f -iname '*.cue' -exec sed --in-place=.backup '/^REM COMMENT.*$/d' {} \;

Re: Batch tag editor for cue sheets

Reply #4
Thanks for your replies. Finally i managed to display the different comments using the album view of foobar, via the "open countaining folder" option of the context menu. This allows me to acces quickly each cuesheet. I guess that's safest way to proceed, although not the fastest, as i dont want to erase all comments of a given cuesheet.