I use file system to manage my knowledge base. The repository has a well defined directory structure. I have a bunch of scripts to help me creating these directories on the laptop. But in iOS, I have to create them manually. Recently, I have found out a way to work around it via Working Copy.
The trick uses two features of Working Copy:
- 2-way synchronized repository with any iOS Files location.
- The shortcut Write Repository File.
The shortcut allows writing file into any path in a repository, and the synchronized repository synchronizes changes back to the target iOS Files location.
In the following I’ll show how to create a shortcut which saves files into an iCloud folder and sorts them into sub-directories by date.
First create the target directory and set up the synchronized repository. I use
Then create the shortcut. It accepts the file from Share Sheet and saves it into the synchronized repository sorted by date. It is important to check the option “Create” in the Write Repository File step.
Now give it a try. Share a text file using the new created action.
And the file appears in the
This solution is not perfect and has two major drawbacks:
- It duplicates the files.
- It requires opening Working Copy to synchronize files.
However, it also has a bonus. I can backup the directory by git now.