Templater: How to create a folder with multiple files inside it

What I’m trying to do

I am trying to create a simple template that will basically create a folder name it Session: [session number]* and inside this folder there will be 4 files inside it called “Characters, Lore, Quotes, Events”

so the file structure will look like this
Session: [number]
-Characters
-Lore
-Quotes
-Events

*idk if this can be automated or something based on how many times this template has run or perhaps use the date that it has been created to replace whats inside the brackets with the actual number

I am quite new to templater and obsidian in general it would mean alot if people could give detailed step by step instructions as I am still learning the hotkeys and which option does what. Thank you!

May I ask why you are trying to make your note structure like this…? Specificlly why you need a folder for this. You can definitely put everything into one note as following:

# FileName (perhaps createdTime in format YYYYMMDDhhmmss)
### Characters
   //content
### Lore
   //content
### Quotes 
   //content, keyword, more content
### Events
   //content

If this session folder thing is to help to get access to certain part, the note could also do some similar stuff like:

  • If you want to get access to certain section
    • type ![[filename#Header]]
    • the exclamation mark is to ask the Obsidian to reader the link
    • ![[FileName#Quote]] will render both the header and the content
### Quote
   //content, keyword, more content
  • If you want to get access to certain paragraph
    • type ![[FileName^ and Obsidian will allow you the access any of the paragraph in [[FileName]]. If you do not know where your required content is, type [[^^ instead.
    • [[^^keyword]] would give you this option
   //content, keyword, more content

However… In terms of data management I strongly recommend you to check out dataview plugin.
(3) An Introduction to Dataview - Part 1 - YouTube

For example, to show all notes’ ### Quote sections in one single note:

```query
path: folder1/ subfolder1 
// to search though the entire vault, delete the above line
line: (# Quote)

to show all notes that have tag #Character

```dataview
list
from #Character

To show all notes that contains a specific character, for instance, Bob

// fileName
# Event A
// note content will be like
Characters:: Ann, Bob, Cel, David
Description:: these guys are having a picnic
  //more content
```dataview
table Description
where contains(Characters, "Bob")
file.name Description
[[Event A]] these guys are having a picnic

this comment is kinda off topic, but I just want you to rethink about your file structure before you actually make a general template.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.