Skip to content

Walk a folder tree and write Obsidian-ready structure markdown files.

  • Location: D:\FSS\Software\Utils\PythonUtils\folder_structure\
  • Config: config.yaml (defaults, KB vault presets, exclude patterns)
  • Launcher: launch-folder-structure.bat (create Desktop shortcut to this file)
Terminal window
cd D:\FSS\Software\Utils\PythonUtils\folder_structure
uv sync
uv run folder-structure

Or double-click launch-folder-structure.bat.

IDPresetSource
aKB RootD:/FSS/KB
bKB CoreD:/FSS/KB/Core
cKB MBRD:/FSS/KB/MBR
dKB SDCD:/FSS/KB/SDC

(KB Business preset removed 2026-07-09 — legacy Business vault no longer exists.)

Default output: D:/FSS/KB/Core/Misc/KB_Structure/

Run from Windows (PowerShell or the .bat launcher). From WSL, wrap in cmd.exe — D:/ source paths don’t resolve inside WSL, and a WSL-side uv run corrupts the Windows .venv (Linux lib64 symlink blocks Windows uv until deleted; hit 2026-07-09):

Terminal window
/mnt/c/Windows/System32/cmd.exe /c "cd /D D:\FSS\Software\Utils\PythonUtils\folder_structure && uv run folder-structure run --preset kb-root"

Output files (prefixes fixed, suffix from output_filename_root: auto):

  • Folder_Structure-D_FSS_KB_MBR.md (folders only)
  • FolderFile_Structure-D_FSS_KB_MBR.md (folders + files)

Manual suffix Test-WSLFolder_Structure-Test-WSL.md + FolderFile_Structure-Test-WSL.md

InputScan methodSpeed
D:/FSS/KBNative Windows<1s
/mnt/d/FSS/KBRewritten to D:\...<1s
\\wsl$\...\mnt\d\...Rewritten to D:\...<1s
\\wsl$\...\home\ta\.claudeWSL native find~1-2s

Recommended for Linux-only paths: use the \\wsl$\Ubuntu-24.04\home\ta\... form — the util detects it and scans inside WSL automatically.

Terminal window
uv run folder-structure run --preset kb-mbr
uv run folder-structure run --source D:/FSS/KB --levels 3 --dry-run
uv run folder-structure list
  • In VS Code, Cursor, etc., right-click on folder, “Generate Markdown structure”
  • For full (Obsidian KB) folder structure: right-click in folder pane open space below folders
  • Agent prompt: Generate a Folder_Structure.md markdown file of the folder/file structure for the current folder
  • More comprehensive than Draw Folder Structure VS Code extension
  • Deprecated script: d:\FSS\Software\Utils\PythonUtils\generate_folder_structure.py
  • Warp workflow: generate-kb-folder-structure.yaml (superseded by this util)