Hey everyone,
I’m totally amazed by how powerful Obsidian is! I’ve just started using it and I’ve been diving into the Obsidian Projects plugin. I wanted to find an easier way to create notes, so I asked ChatGPT for some help, and it led me to a cool trick.
By opening the developer panel with CTRL + SHIFT + I and running the following code on console:
const folderPath = "./FolderPath"; // Specify your folder name
const fileList = await app.vault.adapter.read("./your/folder/path/list.md"); // Read your text file
const fileNames = fileList.split("\n"); // Split into an array of names
for (const fileName of fileNames) {
const trimmedName = fileName.trim();
if (trimmedName) {
await app.vault.create(`${folderPath}/${trimmedName}.md`, ""); // Create empty Markdown files
}
}
This script reads a list of filenames from a text file and creates empty Markdown files in the specified folder. It’s a huge time-saver!
Just wanted to share this in case it helps anyone else. Obsidian really is amazing!