Templater batch update

What I’m trying to do

I’ve created a new Templater template with frontmatter aka properties the way I want them. It works for new files I create. How do I run it on 10, 100, or the 5k files I’ve already created ?

Things I have tried

read documentation

batch - nothing

For what it’s worth, I think you’d have to do a mass find and replace on the files with something like VScode, working outside Obsidian. I have done similar things with python scripts, when I did a mass change of the old frontmatter to Lila Rest’s CSS-based version. More recently, I moved them all back. It was messy but it worked.

I could post my scripts if that was useful but they are nothing to be proud of!

If it helps, this is the Javascript script I used to convert my inline Dataview fields to frontmatter property fields across ~3000 notes:


Thanks. I’ll give it a try this week and let you know. Maintenance a necessary task, but with large vault, a pita…

Thanks for reply. “working outside Obsidian” was my 1st idea, but assume I’ll lose/break the backlinks and frontlinks.

See also this thread:

I think the links get automatically reconstructed when the files are reindexed after being changed. Check this with someone authoritative but that’s always been the assumption I’ve worked on.

Where do you want the tag put? Anywhere special, like in the frontmatter, or will the end of the file do?
Do you have either a serious editor like vscode or python on your system?

Not a programmer.
I have pyCharm but not using it (yet).
I have VsCode, Sublime Text, Notepad++ and Notepadqq, used for different purposes.

In the thread, I showed how someone who doesn’t have YAML can make one with search and replace and the tags of course will come in the YAML block.
I have various scenarios there.
One of them:

And do your 1500 files all have yaml blocks now?

I didn’t need them, the person (might have) needed them; he never specified.

I made YAML like that for 10k plus files a year ago.
Of course, I had ready-made lowercase aliases, etc.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.