# Creating a folder structure from Mindnode

**URL:** <https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624>\
**Category:** Workbook/Workshop\
**Created:** [July 8, 2024, 1:14pm UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624 "2024-07-08T13:14:43Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kelso](https://forum.johnnydecimal.com/letter_avatar_proxy/v4/letter/k/58956e/32.png) [@Kelso](https://forum.johnnydecimal.com/u/Kelso)\
**Post date:** [July 8, 2024, 1:14pm UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/1 "2024-07-08T13:14:43Z")

</div>

I have created my JD system folder structure in MindNode and am wondering how I can import it into Bear app or Obsidian as an index using method 1. So individual notes for every ID. If I have to rewrite everything its painful and copy paste is not much of a time saving,

Also

How do I change my MindNode into a folder structure onto my computer?

---

<div class="post-metadata">

**Author:** ![johnnydecimal](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/johnnydecimal/32/1759_2.png) [@johnnydecimal](https://forum.johnnydecimal.com/u/johnnydecimal)\
**Post date:** [July 8, 2024, 11:23pm UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/2 "2024-07-08T23:23:32Z")

</div>

You can export from MindNode a couple of ways. All via `File > Export To >`

Here’s a quick mind map, let’s see what we can do with it.

 ![CleanShot 2024-07-09 at 09.17.10@2x](https://forum.johnnydecimal.com/uploads/default/original/1X/9961fd6e3577dec176f27dda651702f48b80d331.png)

# Markdown

The first useful thing in the list is `File > Export To > Markdown`. There are no further options, so `Export...` and let’s see what we have.

```txt
# My system

## 10-19 Life admin

### 11 House
- 11.01
- 11.02
- 11.03

### 12 Finance

### 13 Motor
- 13.01
- 13.02

### 14 Health

### 15 Travel

## 20-29 My hobby

### 21 Research

### 22 Promotion
- 22.01
- 22.02

### 23 Sales

## 30-39 My side-hustle

### 31 Build it

### 32 Ship it

```

That’s pretty good, and will import in to Bear (just copy/paste it) _really_ nicely. If you’re on the latest version of Bear, those headers can now be folded using the little triangle to their left.

 ![CleanShot 2024-07-09 at 09.19.34@2x](https://forum.johnnydecimal.com/uploads/default/original/1X/09c6bc06a8a349f4e978d6dc5350ae3cdaedfaf3.png)

# Plain text

You can also `File > Export To > Text > Plain Text`. That gives us an indented version of the same.

```txt
My system
	10-19 Life admin
		11 House
			11.01
			11.02
			11.03
		12 Finance
		13 Motor
			13.01
			13.02
		14 Health
		15 Travel
	20-29 My hobby
		21 Research
		22 Promotion
			22.01
			22.02
		23 Sales
	30-39 My side-hustle
		31 Build it
		32 Ship it

```

Also not bad, but Bear won’t recognise that as anything special. You may prefer this? Put it in a code block?

 ![CleanShot 2024-07-09 at 09.21.34@2x](https://forum.johnnydecimal.com/uploads/default/original/1X/c10435ca622163af4a72a956e31a29c633fd4ba8.png)

# Creating file system folders

This is where our friend @SwissArmyWrench comes in. Does [johnnybgoode](https://forum.johnnydecimal.com/t/johnnybgoode-v1-1-0-is-released/1457) do this? If not, could it?..

---

<div class="post-metadata">

**Author:** ![SwissArmyWrench](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/swissarmywrench/32/642_2.png) [@SwissArmyWrench](https://forum.johnnydecimal.com/u/SwissArmyWrench)\
**Post date:** [July 9, 2024, 12:27am UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/3 "2024-07-09T00:27:19Z")

</div>

Thanks for the ping, Johnny!

Right now, johnnybgoode can’t do this, but there’s no reason it couldn’t! Since I am already planning on building code that would allow you to _export_ in all kinds of formats, such as your own index format you designed, plus JSON, YAML, TOML, etc, there’s no reason I couldn’t also write that code in such a way that it could read in structured data and then recreate the folder structure based on it!

I had never even considered that this would be an option some people want, but now that you mention it, it wouldn’t be a bad idea!

---

<div class="post-metadata">

**Author:** ![Kelso](https://forum.johnnydecimal.com/letter_avatar_proxy/v4/letter/k/58956e/32.png) [@Kelso](https://forum.johnnydecimal.com/u/Kelso)\
**Post date:** [July 9, 2024, 12:03pm UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/4 "2024-07-09T12:03:58Z")

</div>

I would be very grateful for this because, Mindnode is excellent at planning folder structure out.

It was painful to place Johnny Decimal index numbers into it manually, But if there is code that would do that also that would be good also.

---

<div class="post-metadata">

**Author:** ![johnnydecimal](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/johnnydecimal/32/1759_2.png) [@johnnydecimal](https://forum.johnnydecimal.com/u/johnnydecimal)\
**Post date:** [July 9, 2024, 7:55pm UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/5 "2024-07-09T19:55:31Z")

</div>

How good are you with Excel? I’ve just realised the ‘quick ‘n dirty’ way that I would do this.

I’ll type it out, and if you know what I’m on about it’ll make sense. But I can do you a video later if you like as well, just let me know.

So, export-as-plain-text from Markdown. Now you have a file with one line per folder that you want to create. Bring that in to Excel.

Now use your Excel wizardry to build the full path to each of your IDs, like

`10-19 Area/11 Category/11.01 ID`

…using lookups and `CONCAT` and so on.

And now just `CONCAT` your way to a command that will create those folders:

`CONCAT("mkdir -p ", cell_containing_folder_path)`

The `-p` tells `mkdir` to create the full path. So you don’t need to create area & category folders first.

If that’s all voodoo to you just let me know and I’ll put together an example sheet. It’s a bit hacky (it’s _heaps_ hacky) but it works really well for this sort of thing. And I like that you can see exactly what command you’re going to paste in to the terminal vs. running some script and crossing your fingers.

---

<div class="post-metadata">

**Author:** ![Kelso](https://forum.johnnydecimal.com/letter_avatar_proxy/v4/letter/k/58956e/32.png) [@Kelso](https://forum.johnnydecimal.com/u/Kelso)\
**Post date:** [July 9, 2024, 10:14pm UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/6 "2024-07-09T22:14:03Z")

</div>

Thank you Johnny!

I think a video will definitely help, lookups are not intuitive for many.

---

<div class="post-metadata">

**Author:** ![johnnydecimal](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/johnnydecimal/32/1759_2.png) [@johnnydecimal](https://forum.johnnydecimal.com/u/johnnydecimal)\
**Post date:** [July 9, 2024, 10:34pm UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/7 "2024-07-09T22:34:31Z")

</div>

I’m at the library this morning, will knock something together when I get home mid-afternoon.

---

<div class="post-metadata">

**Author:** ![johnnydecimal](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/johnnydecimal/32/1759_2.png) [@johnnydecimal](https://forum.johnnydecimal.com/u/johnnydecimal)\
**Post date:** [July 11, 2024, 4:44am UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/8 "2024-07-11T04:44:09Z")

</div>

[![](https://forum.johnnydecimal.com/uploads/default/original/1X/6cbfc4bcdd7014efba8167ae81de01385ee045d2.jpeg "Convert a MindNode to a folder structure with Excel") ](https://www.youtube.com/watch?v=lD77d5v7go0)

---

<div class="post-metadata">

**Author:** ![LasTr](https://forum.johnnydecimal.com/letter_avatar_proxy/v4/letter/l/e36b37/32.png) [@LasTr](https://forum.johnnydecimal.com/u/LasTr)\
**Post date:** [July 15, 2024, 6:37am UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/9 "2024-07-15T06:37:46Z")

</div>

I have found that pasting the indented structure into Claude or another GPT and asking for a bash command to create the folder structure has worked well for me at least once.

---

<div class="post-metadata">

**Author:** ![johnnydecimal](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/johnnydecimal/32/1759_2.png) [@johnnydecimal](https://forum.johnnydecimal.com/u/johnnydecimal)\
**Post date:** [July 27, 2024, 11:29pm UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/10 "2024-07-27T23:29:44Z")

</div>

@Kelso Just checking in that you achieved your goal? Let us know if you’re still in need of help.

---

<div class="post-metadata">

**Author:** ![Kelso](https://forum.johnnydecimal.com/letter_avatar_proxy/v4/letter/k/58956e/32.png) [@Kelso](https://forum.johnnydecimal.com/u/Kelso)\
**Post date:** [September 5, 2024, 10:57am UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/12 "2024-09-05T10:57:12Z")

</div>

Thank you, yes that helped and I also have another method from a colleague, which I will share

---

<div class="post-metadata">

**Author:** ![Keith](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/keith/32/1610_2.png) [@Keith](https://forum.johnnydecimal.com/u/Keith)\
**Post date:** [October 13, 2025, 4:25pm UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/13 "2025-10-13T16:25:05Z")

</div>

@johnnydecimal This is a really useful video, but try as a might, I cannot get the echo command to work whereby it places the created file in the required folder. Any ideas what I might be doing wrong?

Also, I had to change a few things in my entries, which was throwing the directory structure off, such as using a “&” in titles.

---

<div class="post-metadata">

**Author:** ![johnnydecimal](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/johnnydecimal/32/1759_2.png) [@johnnydecimal](https://forum.johnnydecimal.com/u/johnnydecimal)\
**Post date:** [October 13, 2025, 10:10pm UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/14 "2025-10-13T22:10:18Z")

</div>

Can you paste it (the not-working command) here? Happy to have a look.

Stick it between two `` backticks `like this` so any special characters are left as-is.

---

<div class="post-metadata">

**Author:** ![Keith](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/keith/32/1610_2.png) [@Keith](https://forum.johnnydecimal.com/u/Keith)\
**Post date:** [October 13, 2025, 10:44pm UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/15 "2025-10-13T22:44:58Z")

</div>

Here is the Excel formula I’m using

`=CONCAT("echo # ", [@[ID/Desc]], " > ", SUBSTITUTE([@[ID/Desc]], " ", "\ "), “.md”)`

Which results in something like this…

| echo # 50.00 JDex for Genealogy 🗃 \> 50.00\ JDex\ for\ Genealogy\ 🗃.md |
| --- |

Pasting this creates the file, but at the root and not in the JD structure I created.

---

<div class="post-metadata">

**Author:** ![johnnydecimal](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/johnnydecimal/32/1759_2.png) [@johnnydecimal](https://forum.johnnydecimal.com/u/johnnydecimal)\
**Post date:** [October 14, 2025, 2:28am UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/16 "2025-10-14T02:28:28Z")

</div>

Okay, so without any file path in front of the name of the file, that’ll create the file at the same location that your prompt is at, i.e. the root.

What does your structure look like? We’ll need to modify the `CONCAT` to add it to the front of that file path.

_Or_ to be honest this sort of thing is sometimes quicker just done manually. Like if you’ve only got to move 50 JDex files from the root in to a category folder, just drag them over. That’d be more time-consuming if you’ve got a folder for every entry.

---

<div class="post-metadata">

**Author:** ![Keith](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/keith/32/1610_2.png) [@Keith](https://forum.johnnydecimal.com/u/Keith)\
**Post date:** [October 14, 2025, 8:53am UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/17 "2025-10-14T08:53:55Z")

</div>

I have a folder per entry so about 260 entries across three areas, so I’d really rather not do them manually if possible. I’m just not sure how or where to define the path.

---

<div class="post-metadata">

**Author:** ![Keith](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/keith/32/1610_2.png) [@Keith](https://forum.johnnydecimal.com/u/Keith)\
**Post date:** [October 14, 2025, 10:19am UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/18 "2025-10-14T10:19:32Z")

</div>

I’ve figured it out using a single command to create both the file structure and the .md file at the same time.

`=“mkdir -p “”” & F3 & “”" && echo “”# " & E3 & “”" > “”" & F3 & “/” & E3 & “.md”“”`

| |
| --- |
| |

---

<div class="post-metadata">

**Author:** ![johnnydecimal](https://forum.johnnydecimal.com/user_avatar/forum.johnnydecimal.com/johnnydecimal/32/1759_2.png) [@johnnydecimal](https://forum.johnnydecimal.com/u/johnnydecimal)\
**Post date:** [October 14, 2025, 10:05pm UTC](https://forum.johnnydecimal.com/t/creating-a-folder-structure-from-mindnode/1624/19 "2025-10-14T22:05:21Z")

</div>

Nice!
