similar thread:
you’ll need to hunt for a plugin or more probably have a bash/shell or python script written that does the job with obsidian closed