I find myself making the same folders and files over and over again, and it would be nice if I could automate some of this.
I use templatr and hot keys to create a new file with a template, but as far I can tell, it can’t create folders.
Here is a rough example.
Is there some solution that would allow me to do this in a more automated manner?
touch 'case notes.md'
Running the script will create the folders and files you need.
The script can be run on your command line or with the right plugin from within Obsidian.
It is possible to run system commands from a template to do this at the press of a keyboard shortcut!
Read over my post on running any command… but modify this process to run the above commands (to create folders and files).
I thought about something like that, but was hoping something more native would be possible. It’s worth a shot.
It’s there, but it’s kind of indirect. If you either move or create files to new directories, they automatically appear.
@holroy That’s pretty cool! If you could, it would be very helpful to see an example Templater script that did this for even a simplified version of the above use case. Thanks!
In this thread, Dynamic folder creation from a template - #2 by holroy, every new file was moved into a not one, but two deep new folder structure, based on the hour and minute of the current hour. Maybe not the most practical example, but it shows one way of creating folders using the move command.
In your case you might want to create new files in the given directories (, or slightly less elegant you could move one file around creating directories as the file bounces around… )
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.