Search for untagged

Use case or problem

When you are migrating a lot of existing documents to Obsidian, there could be an unknown number of files without any tags. It would be helpful to return the list of files that don’t have any tags at all so appropriate tags can be added.

Proposed solution

Search currently supports tag:#tag-name. Adding tag:unknown or tag:none could return the list of matches without a tag.

Current workaround (optional)

Compare the list of all *.md files against the list of all *.md that have a tag and output the file names that are missing tag values.

find . -iname "*md" | sort > ~/Desktop/f1.txt
find . -iname "*md" -exec grep -l '^\#[a-zA-Z]' {} \; | sort > ~/Desktop/f2.txt
comm -23 ~/Desktop/f1.txt ~/Desktop/f2.txt
1 Like

You could use the dataview plugin. Try this out to see if this works:

List FROM ""
WHERE !tags

Doesn’t honor the where clause and returns a list of all files.

Oh… I think the solution in this video should work.

Thank you, using WHERE length(file.tags) = 0 works exactly the way I wanted.

```dataview
List FROM "" WHERE length(tags) = 0
```
2 Likes

Search - -/#[a-z]\w+/