Tags: Assign a tag to multiple files

Is there a way to assign the same tag(s) to multiple notes at once?

MOD-EDIT:
Related To: Tag Mass Action: Rename and Delete in multiple files

67 Likes

Other than one by one? I don’t think so, except really ugly hacks with external scripts

2 Likes

Yes, I meant ā€œbatch addingā€ of a single tag to multiple files.

ie: You have Ford, Fiat, Chrysler, VW, Audi… etc files and you want to tag them all with #carbrand

2 Likes

I didn’t realize something like this was not possible.

3 Likes

How is the list of files going to be specified?

  • Selection of files in file Explorer within Obsidian?
  • Files refered by collection of links within some markdown file?
  • All files contained in folder and its subfolders?

Edit thanks WahWah for clarification↓.

  • list copied from search results
2 Likes

Like in most apps where this is any easy thing: search across all notes for a subset you want to tag. Use REGEX to get said set, select all results. Use the tag option to tag all entries in the set. Done.

3 Likes

From Obsidian Release v0.9.3

When using global search, you can now copy the search results file list. This can be optionally formatted as wikilinks and/or as lists.

Now it is available as last icon above search text box. I do not know if API version of this command exists.

I think this request could be best done as a plugin.
I do not know if it is better then to store it in feature-requests or plugin-ideas category.

The plugin could:

  • add custom hotkeys for even faster use. Especially when Single key hotkeys (context sensitive) become supported.
  • have options whether to add tags:
    • to standard front-matter field ā€œtagsā€
    • in some other syntax/place
  • have option to insert only those tags that are not assigned yet to given note
    • in YAML front-matter field ā€œtagsā€
    • in some other syntax/place
2 Likes

Since tag support is already a core feature of Obsidian, I would argue this feature request is best implemented as a core feature. As @WahWah said, this is pretty standard in apps that support tagging.

As to the specific UI implementation, @malecjan mentions several good options. As with other file management actions, I think it makes sense to let the user do it in several different ways. Using the File Explorer and Search Results seem to be the most compatible with Obsidian’s current UX.

File Explorer

First, multi-select of files in File Explorer, then
→ right-click menu ā€œAdd tag to selected filesā€
→ command palette ā€œAdd tag to selected filesā€
→ drag selected files to the tag in the tag pane OR drag the tag from tag pane to the selected files

Search Results

First, perform a search query that give results, then
→ click a new # button (next to the ā€˜copy search results’ button) to assign a tag to all notes in the search results

22 Likes

I’m all about this feature. I’d just like to add that there also needs to be a way to REMOVE a tag. So if there is a context menu or command palette item for ā€œAdd a tag to selected filesā€, there should also be one for ā€œRemove a tag from selected filesā€.

10 Likes

@Gem, this may help:

By the way, an example of free software that can mass search and replace is VSCode.

Thanks

2 Likes

We need an interface that can manage labels systematically, and more abundant label functions.

1 Like

Thank you but I’m not talking about editing or removing a tag at the global level. I meant removing a tag from, say, 5 selected files out of 100 that have that tag. Really just the inverse of adding a tag to multiple selected files.

3 Likes

+1 on the feature request for being able to add or delete tags in batch mode.

1 Like

+1 Would love support for this too!

I know this is not what you are looking for, you want to do it within Obsidian, but if you desperately need to do that now, in the meantime: http://postimg.cc/Mn0PN2ZZ

grepWin is open-source freeware, so it might get you out of a jam for now?

1 Like

+1 here

Same here.

This feature would be a great time-saver.
It is very cumbersome to tag every file step by step.

Do you know if there are any similiar workarounds for Mac?
Are there any multiple batch tag applications for MD Files out there?

+1
Tagging is very important for organization so system to allow to add and delete tags to multiple files would be very useful…

1 Like

Manual workaround using Atom.io here:

My god! This isn’t in Obsidian?

Bit of a shocker.

4 Likes