Remove string from filename


#1

Peace everyone. I'm new to the forum.

I have been using mp3tag for a few months, love it.

Usually I just want to remove unwanted tags, and maybe add a cover or two. I run a record pool and radio show and my dj's are use to getting filenames and tags a certain way. Sometimes promoters put unwanted info in the tags. That's no problem. The problem is when someone puts unwanted info in the actual file name.

Example: Filename is: Sak Pase Feat. Ron Browz - SF Spark Flame ( 2o1o ) [Promotions done by Joe!!].mp3

I want to remove just the: ( 2o1o ) [Promotions done by Joe!!]

So the filename reads: Sak Pase Feat. Ron Browz - SF Spark Flame.mp3

I have already manipulated the tags as I want them to appear. I tried to export to csv. I opened it up in excel. Did find and replace and deleted all of the strings I didn't want. Is there a way to bring it back in to mp3tag? Or is there a simpler way to achieve this?

Whoever pulls this off is my new past friend! The only option right now is to edit each filename with rename and that's tedious. Record Pools have definitely changed since the days of just vinyl, and then a mix of vinyl and cd's. It's all Mp3s and with the Internet takeover for the music game, there are 100's of promoters opposed to the 20 or so I knew by name. I get no less than 200 emails related to music everytime I open my inbox, and I service my dj's with no less than 1 dvd full of mp3s a month, usually 2 and as many as 4.

Just the singles for this month are about 800 mp3s (radio, album, inst, remix, etc...) so going through 800 mp3s just to change the filename would give me carpal tunnel lol.

Any assistance would be great.

Definitely going to Donate because the program has already trimmed a lot of my work. I use to go through these one at a time, but now the volume is just to great and time is of the essence.

Thanks in advance. :music:


#2

If your tag %artist% reads "Sak Pase Feat. Ron Browz"
and your tag %title% reads "SF Spark Flame" (without any stuff in brackets) then there is nothing simpler than to use the Action
Tag - Filename
Enter as mask
%artist% - %title%

If - on the other hand yout %title% still has all the years and promos and such in it, you need to cut the %title% short.
Enter as a mask for the Action Tag-Filename:
%artist% - $left(%title%,$strchr(%title%,'('))

What it does: write %artist% but write only that of %title% which is on the left of the first opening bracket.
Try it on a single track if it fits your needs.


#3

Thanks.
Let me elaborate further. The title and artist tags are either blank or have "Done by Joe Promotions" in the title and artist field.

If I got Tag-Filename with artist - title it renders the file name " - .mp3" or "done by joe promo - done by joe promo.mp3"

So what I need is to either strip the filename to tags to fill in the title and artist fields and then do what you are saying, or what I was trying to do was export to csv, do the find and replace in excel and somehow bring it back in so that the filename reads with out the junk.

Any suggestions?


#4

I am not quite sure what your filenames look like. I take a wild shot:
They have all the data for %artist% and %title% already there only that it is still only the filename, right?
So you can fill your tags with the function "Filename - Tag". Only enter an appropriate pattern. THis should not be too difficult as MP3tag shows you a preview right while entering the mask.
It is possible to use the same instructions for importing data from the filename so you may strip the unwanted data with that $left(... expression during import.


#5

You can do the replace in Mp3tag.
Make a new action:

Action type: Replace
Field: _FILENAME
Original: " ( 2o1o ) [Promotions done by Joe!!]" (without quotes)
Replace with:


#6

Dano! That's it. My man. Thanks. Thanks for the other suggestions people. You saved me hours of work


#7

Thanks so much, dano.. That was really really helpful.