I have got about 6,000 old daily notes that I want to bring into Obsidian. Unfortunately, the file names are formatted like this:
54 Wednesday, 12 December 2012.md
55 Thursday, 13 December 2012.md
56 Friday, 14 December 2012.md
I would like to change them to:
Is there a way I could use regex or anything else to rename all the files?
Looking for a tool that can do this myself. Let us know if you find one, it is very useful!
Many thanks. I have tried a few renaming apps, but can’t get anything to work as I need it to. If I can figure out the regex, I will post it here. I have managed to get the files down to this format:
However, I can’t get the regex to ‘find’ the right pattern and then replace it as:
Hope to get there eventually.
I am very grateful. And edging closer to a solution.
With thanks to @stevelw for the pointers, I devised a convoluted method that worked. I am sure someone else would be able to come up with a simpler solution. Here goes (on macOS):
- Copy original files in Finder to create a backup
- Download Renamer
- Find comma, replace with nothing
- Find close bracket, replace with nothing
- Find space, replace with underscore
- Remove prefixes (in Finder), using the Automator Quick Action described in this thread
- Find underscore, replace with forward slash
- Add leading zero (for days with a single digit only) using regex
- Find and replace months with digits: January = 01, February = 02, etc
- All the files now in dddd/DD/MM/YYYY format
- Use Regex to change the order of the four identifiable parts
- All files now in YYYY-MM-DD-dddd
- Copied files into Obsidian
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.