I’m building a shortcut to update / annotate clipped web content. When updating I need to find a file in a folder On iPhone
(Obsidian) that contains a string in the file e.g. url: https://talk.automators.fm
. How can I do that efficiently inside Shortcuts / background without having to switch to an app?
There are about ~2500 txt files in a single folder. As a reference: a grep
command on macOS can find a file in < 1s
What I’ve tried:
- Using the Files actions is too in efficient; it takes huge amounts (minutes) of time to open all files (~2500) and loop through them]
- Obsidian Actions can find the file, but needs to switch to the app also (although they try to hide the switch by blacking it out; understandable, but a hack
- a-Shell can use grep and even has shortcuts support, but no access to
On iPhone > Obsidian
in the Shortcuts runner (it does work in the a-Shell app). There’s a relevant issue here: Extension no longer has access to folders from `pickFolder` · Issue #729 · holzschu/a-shell · GitHub
Are there any other ideas how to identify a file based on a string in the content via Shortcuts?