Apply filename to title:: property

I had a bunch of files imported from Obsidian with dots in their filenames. These produced unwanted namespaces, and to prevent that, I needed to update the files with title:: properties.

I made a shortcut on MacOS to do this from a Finder selection, and I’m sharing it in case it’s useful to someone.

The shortcut takes files selected in Finder, and checks if the filename, say A. A. Milne.md contains . (the dot before the extension doesn’t count). If it does, it prepends a title property matching the filename to the file, like this: title:: A. A. Milne.md.

Reindex your graph to see the effects.

Note 1: You could always remove the If portion of the shortcut to cause it to simply add a title property for every file.

Note 2: This shortcut will likely not work on iOS unless you are working with files that are within the Shortcuts folder on the filesystem itself.

Thanks for making this! Are you moving over from Obsidian to Logseq?

1 Like

Yes, I moved from Obsidian to Logseq. Really happy with it, especially now that whiteboards are in beta

I know those dot filenames in macOS. You can make them visible in e.g. VS Code.

So, would it not be easier and faster to, before exporting, open your Obsidian vault in VSC and delete those dot files, then export?

BTW, why do you need to export Obsidian files to get them in Logseq? Both are .md-based apps.