getmusicbee.com

Support => Tips and Tricks => Topic started by: hiccup on June 03, 2021, 06:26:29 PM

Title: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: hiccup on June 03, 2021, 06:26:29 PM
Suppose you want to add a tag value to multiple files at the same time.

That is not a problem if you want all the selected files to have the exact same tag values.
You can use the Tag Editor for that.
But if the files already contain various tag values, and you simply want to add an additional value to all of them while keeping the existing ones intact, it's more difficult.

Let's say for example you have been using the 'keywords' tag, and want to add something like 'Christmas' as a keyword to multiple songs at once.
Without worrying about possibly erasing existing keywords.
Or you want to add 'Ambient' to the 'genre' tag of multiple songs that already have one or more other genres added.

MusicBee doesn't have some straightforward 'add tag value' feature for this.
You can use the Tag Inspector, but it's interface is not ideal for this.
Also the Tag Inspector only allows for bulk editing of tags if the files are all of the same file format.
So if for example you have selected both mp3 and flac files, this won't work.

This is a method that makes it possible to add a tag value to multiple files at once, without deleting existing tag values.

To use it, you need to have the Additional Tagging & Reporting Tools (https://getmusicbee.com/forum/index.php?topic=3833.0) installed.

- - -

Download the preset here (https://www.dropbox.com/scl/fo/gxp45j43rji7elmx29kbu/h?rlkey=nw6g0nkxvlirgbjh3eguyp6m0&dl=0)

- - -

how to install the preset:

how to use:


(https://i.imgur.com/WDlizTS.png)


Check the preview to make sure you are happy with the results, if so: apply, close.


(https://i.imgur.com/NBhzz9n.png)


that's it

- - -

Update:
I have added a preset to the download that can do the opposite: it makes it possible to remove a specific tag value from multiple files.
Title: Re: Adding a tag value to multiple files at once, preserving existing tag values.
Post by: phred on June 03, 2021, 07:31:11 PM
Nicely done.
And this is going to be quite helpful.
Title: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: hiccup on January 19, 2022, 03:51:39 PM
updated

Added a preset to remove a tag value from multiple files.
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: phred on January 19, 2022, 04:14:32 PM
updated
Are you sure?
The RAR contains the same two presets that I downloaded previously. And they have the same time-stamp as previous.
I assumed there would be a third preset.
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: hiccup on January 19, 2022, 04:19:20 PM
updated
Are you sure?
The RAR contains the same two presets that I downloaded previously.
I assumed there would be a third preset.
I added the 'remove tag' preset to the download link only yesterday.
And I realised just now it would be good to mention that in an 'update post', and also change the title of the thread accordingly.
Thanks for paying attention ;-)
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: phred on January 19, 2022, 04:24:42 PM
I added the 'remove tag' preset to the download link only yesterday.
Right - that's when I grabbed both of them even though I already had the first one from June.

Quote
Thanks for paying attention ;-)
It hasn't been easy.
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: hiccup on January 19, 2022, 04:35:53 PM
Right - that's when I grabbed both of them even though I already had the first one from June.
Great.
Let me know if they work well for you too?
I have been testing them quite thoroughly myself, but you never know about other's configurations and user cases.
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: phred on January 19, 2022, 06:54:04 PM
Let me know if they work well for you too?
The first one (from June) worked right out of the box with no issues.
I haven't used yesterday's other than to test it on a few tracks and it also worked.

Thanks for creating the preset.
Too bad no one else knows what they're missing. Unless they've downloaded and used without commenting on how useful they are.
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: hiccup on January 19, 2022, 07:20:12 PM
…Unless they've downloaded and used without commenting on how useful they are…
That's probably an uncertainty for the majority of cases where people in general upload their contributions to da internetz.
If there are no, or hardly any responses, all you can do is assume that it's working great without any issues, or that nobody cares ;-)

(as a user/consumer/freeloader, I am probably—usually—not much different from that)
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: Johan_A_M on March 03, 2022, 06:36:57 AM
This is great Hiccup, I think this will help me a lot regarding my question in TOPIC: HOW TO ADD PERFORMER ROLES IN BATCH? (https://getmusicbee.com/forum/index.php?topic=36231.0)!
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: Dalinar on April 29, 2022, 10:29:54 PM
does anyone have a copy of this preset? the link doesn't work - bit ly says it is harmful
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: phred on April 30, 2022, 03:13:09 AM
does anyone have a copy of this preset? the link doesn't work - bit ly says it is harmful
The best way to get the bitly link issue resolved is to fill out the form at the bottom of the warning. The more MB users who do this the better chance we have of getting it unblocked.
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: Dalinar on April 30, 2022, 12:55:27 PM
I figured it out.. I didn't notice the url before because my browser is thin on the right side of my screen now, so I couldn't see the url box.

So I just copied the dropbox out the url in the warning page and decoded it. Then I was able to download the preset rar.. just in case anyone else has this problem.
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: tjinc on July 31, 2023, 06:39:27 PM
This weekend I was trying to work out how to add a tag to a batch of files with already existing mixed values. Found this post - with the clear instructions and the presets working straight out of the box this task was made remarkably easy.
I might be a little late to this particular party but thanks, this is good stuff.
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: boroda on July 31, 2023, 07:27:37 PM
@hiccup, maybe it's worth to update the preset's installation instruction, considering that there are "import"/"export" buttons in ASR window already for a long time?
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: hiccup on July 31, 2023, 09:02:13 PM
@hiccup, maybe it's worth to update the preset's installation instruction, considering that there are "import"/"export" buttons in ASR window already for a long time?
done
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: boroda on July 31, 2023, 10:21:46 PM
how to install the preset:
  • open AT&RT's 'Advanced Search & Replace' panel
  • click the 'Import…' button and navigate to the downloaded preset
  • click 'Save All & Close'
  • close/restart MusicBee

minor correction: italicized steps are not actually required to use imported presets (saving presets can be done at any time, or not done at all. mb restart is not required in any case).
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: hiccup on August 01, 2023, 06:51:36 AM
minor correction: italicized steps are not actually required to use imported presets (saving presets can be done at any time, or not done at all.
After importing a preset, the plugin will require some acknowledging of 'saving'.
My intuitive preference would be to save the change immediately after importing a preset.
Same as MusicBee has 'Apply' buttons where you can save changes and leave a panel open.
But with AT&RT the 'Apply' button is greyed out in this case.
Perhaps it should be available after importing a preset?

(the 'restart MB' part was removed)
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: boroda on August 01, 2023, 04:20:32 PM
hmm, "apply" (and "preview") button is enabled if some preset is selected. "apply" becomes enabled for me after i select imported preset.

isn't it the case for you?
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: hiccup on August 01, 2023, 05:15:06 PM
hmm, "apply" (and "preview") button is enabled if some preset is selected. "apply" becomes enabled for me after i select imported preset.
I think it functions awkward.
When you have imported a preset, a warning triangle shows that you have unsaved changes.
Your impulse would be to then simply press 'save' or 'apply'.
But those are not available.
I see that after you then select the presets panel, the 'apply' button does become available, but when you click it it will say 'no files selected'.

There is a lot of "computer says no" going on here ;-)
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: boroda on August 01, 2023, 11:13:58 PM
When you have imported a preset, a warning triangle shows that you have unsaved changes.
Your impulse would be to then simply press 'save' or 'apply'.

yes, "unsaved" mark means that if you simply close ASR window (by clicking "cross" title bar button or "close" button), and answer "don't save changes" in the following dialog, then you will lose all changes (including new imported presets). but you still can use changed or new/imported presets without saving them (until you close ASR window). i don't see what is "awkward" here.

"apply" and "preview" buttons have nothing to do with saving presets. don't confuse applying preset ("saving" preset results) and saving new/changed preset definitions.

But those are not available.

which ones? "save & close" button is always enabled. "apply" and "preview" buttons are only enabled if some preset is selected (otherwise it's not clear, which preset must be applied). again, "availability" of "preview"/"apply" buttons has nothing to do with any preset creation/deletion/importing/installing/etc. the only requirement is that some preset must be selected.

I see that after you then select the presets panel, the 'apply' button does become available, but when you click it it will say 'no files selected'.

hmm, should ASR just guess, which tracks it must apply preset to, if no tracks are selected?

There is a lot of "computer says no" going on here ;-)

hiccup, i very respect you, but i really don't catch your point. would you like the ASR guess for you what do you want to do in all these cases?
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: hiccup on August 02, 2023, 07:29:20 AM
which ones? "save & close" button is always enabled. "apply" and "preview" buttons are only enabled if some preset is selected (otherwise it's not clear, which preset must be applied)
My whole point here is simply about the process of importing a preset, and making (being) sure that AT&RT has saved that new entry.

In MusicBee, when you have changed a setting, you can always press 'Apply', and you can be confident the new setting was stored. (the panel still opened to do other things)
When you have entered a new virtual tag, you can simply press 'Save', and you can be confident it has been stored.

With AT&RT there is an (in my opinion) unintuitive mix between when an how 'things' are saved.
The 'save' and 'apply' buttons are intertwined and dependent on if there have been possible changes to files.

The howto of this specific tips&tricks thread would be much more simpler if it could just say:
- press 'Import' to find and import the new preset.
- press 'save' so it is stored in AT&RT

Everybody would understand that. And to me it just seems the logical way.
Your explanation of how this all currently works is far more complicated and will not be clear to new users.

(it also makes me insecure, which is probably the reason why I still often decide to restart MB after having made any changes to AT&RT. Just to be sure)
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: boroda on August 02, 2023, 06:09:01 PM
In MusicBee, when you have changed a setting, you can always press 'Apply', and you can be confident the new setting was stored. (the panel still opened to do other things)
When you have entered a new virtual tag, you can simply press 'Save', and you can be confident it has been stored.

ok. i can change the wording of "apply" button name to, say, "proceed". it won't be better, but it will be consistent with mb native term conventions.

With AT&RT there is an (in my opinion) unintuitive mix between when an how 'things' are saved.
The 'save' and 'apply' buttons are intertwined and dependent on if there have been possible changes to files.

no, "save" saves all new/changed preset definitions to settings file, "apply" applies current (saved or not) preset to tracks. i can add tool tips to "save all & close" and "apply" buttons, if this is unintuitive (though, i'm surprised of this).

The howto of this specific tips&tricks thread would be much more simpler if it could just say:
- press 'Import' to find and import the new preset.
- press 'save' so it is stored in AT&RT

and this is completely correct description in case a user is not going to apply imported presets immediately. just, it's not worth to write that clicking "save & close" button (closing ASR!) is required. earlier, ASR had the button "save all" along with "save all & close", i had to remove this button due to a lack of space in the ASR window. maybe I did it for nothing.

(it also makes me insecure, which is probably the reason why I still often decide to restart MB after having made any changes to AT&RT. Just to be sure)

you are wrong in this statement because saving presets from ASR (and without restarting the mb/plugin) immediately writes the latest preset definitions to files. it has no disadvantages compared to restarting mb/plugin.

-----------------

p.s. it's wrong topic to discuss such aspects of ASR implementation. i think you now understand how ASR works with respect to importing presets. and of course, it's up to you if it's worth updating the first post again or not.
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: hiccup on August 02, 2023, 06:17:54 PM
i think you now understand how ASR works with respect to importing presets. and of course, it's up to you if it's worth updating the first post again or not.
I think I understood before, but I just didn't agree on how it works ;-)

I'm gonna leave it at this.
Users will have to learn and understand that the plugin does things like this a bit differently from MusicBee itself.
Not a big problem.

PS
If anyone would like to continue this matter, as suggested by boroda: please do so on the Additional Tagging & Reporting Tools (https://getmusicbee.com/forum/index.php?topic=3833.0) board.
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: dannylee11 on October 13, 2023, 01:25:59 AM
Can you explain what this error message is?  I've been trying to add a new genre tag to the existing ones, on multiple songs at a time, but keep running into this error:

MusicBee v3.3.7491.38139P  (Win10.0), 12 Oct 2023 19:23:

System.ArgumentException: Illegal characters in path.
   at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at MusicBeePlugin.AdvancedSearchAndReplaceCommand.Preset.savePreset(String pathName)
   at MusicBeePlugin.AdvancedSearchAndReplaceCommand.saveSettings()
   at MusicBeePlugin.AdvancedSearchAndReplaceCommand.buttonSaveClose_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: phred on October 13, 2023, 02:13:17 AM
Can you explain what this error message is?
The error is being thrown by the Additional Tagging and Reporting Plugin's Advanced Search and Replace module. More than likely because you're using a newer version of the plugin which requires the latest v3.5 of MB and you're using a very old version. Since you're using the Portable version, download and install the latest 3.5 patch (see my signature below) and you should be all set. If not, post the issue on the thread for the plugin. This section is really only for Tips & Tricks (no questions please.)
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: dannylee11 on October 13, 2023, 07:44:32 AM
Can you explain what this error message is?
The error is being thrown by the Additional Tagging and Reporting Plugin's Advanced Search and Replace module. More than likely because you're using a newer version of the plugin which requires the latest v3.5 of MB and you're using a very old version. Since you're using the Portable version, download and install the latest 3.5 patch (see my signature below) and you should be all set. If not, post the issue on the thread for the plugin. This section is really only for Tips & Tricks (no questions please.)


This worked!  Thank you so much for the time you put into this, this helps me more than you can even know!  I'll save year's worth of time and effort with this. 
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: phred on October 13, 2023, 02:25:47 PM
This worked!  Thank you so much for the time you put into this, this helps me more than you can even know!  I'll save year's worth of time and effort with this.
Glad to hear that.

It's always a good idea to keep MB updated as Steven is frequently issuing bug fixes and improvements. And since it's so easy to update the Portable version, there's no reason not too.

Go enjoy the year's worth of time you just gained.   :-)
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: hiccup on October 13, 2023, 02:37:33 PM
Thank you so much for the time you put into this, this helps me more than you can even know!  I'll save year's worth of time and effort with this.
Glad to hear that.
Go enjoy the year's worth of time you just gained.   :-)
I wouldn't be too surprised if that part of the quote was intended to refer to the creation/creator of this Tip & Trick   ;-)
Title: Re: How to add or remove a tag from multiple files, leaving the other tags intact.
Post by: phred on October 13, 2023, 02:54:36 PM
I wouldn't be too surprised if that part of the quote was intended to refer to the creation/creator of this Tip & Trick   ;-)
I like to think it was directed at the entire MB community.  :-)