I would like to import my notes from Roam. And I would like to rename the file names of my Daily Notes from Roam’s format (September 18th, 2020.md) to something numeric like 2020-09-18.md. As far as I can tell, Obsidian’s built-in import formatter doesn’t do this yet, and the “Daily notes” plugin doesn’t reformat existing note titles, so it seems that my best bet would be to use software like Bulk Rename Utility combined with regex. However, I’m a regex beginner. So, I thought I would check: has anyone already solved this? Thanks!
I haven’t done this myself, but some initial ideas would be to target files that end with , 2020.md. From there, I think you’ll need a script to convert the date format. Do you have any programming experience?
Awesome! Many thanks. That was enough to get me started. The script linked to from the youtube video helped me construct a workable regular expression. (Writing my own script would be preferable but a lot harder for me.) Anyway, at least I can now avoid renaming every file manually and instead just run 24 operations (2 per month).
For example, for September single-digit days, the regular expression (using Bulk Rename Utility) would be September\s(\d{1})\w{1,2},\s(\d{4}), and the replacement string would be \2-09-0\1. For double-digit days, the regular expression would be September\s(\d{2})\w{1,2},\s(\d{4}), and the replacement string would be \2-09-\1.
Eventually, it would be great to put together a script (perhaps using Python’s dateutil parser, as in the linked script), or perhaps a corresponding feature will be added to Obsidian, but this semi-automated Regex approach works for me for now. (Perhaps there’s also a way to create a single search and replace combo that works for both single- and double-digit dates…)