π DirTreeGenerator is a lightweight desktop utility to generate clean, readable directory tree structures with configurable ignore rules.
Designed for developers who want to quickly document project structures in Markdown-friendly formats.
π Latest Version: v2.1.0
π Supported Operating System: Windows
- Generate directory trees with classic tree-style formatting
# A small demo for the formatting MyProject/ βββ src/ β βββ main/ β β βββ java/ β βββ test/ βββ pom.xml βββ README.md - Blacklist / Whitelist filtering
- Ignore unwanted files or folders
- Or only include explicitly listed entries
- Select only the folders you want before exporting
- Save output to file with one click
- Modern dark UI powered by FlatLaf
π Click here to download DirTreeGenerator.
- Download the
.exefile. - Run it.
That's it, nothing else required. (No Java installation required, as JRE is bundled.)
- Click
Open Folderto choose a root directory.
- The directory tree will be generated and displayed.

- Select the directories you want to export (or de-select the unwanted ones)
- Click
Exportto export the result to a text file - (Optional) Open
Settingsto configure:- Filter mode (Blacklist / Whitelist)
- Ignore rules
- Default expanding layers
π Automatically generated at
C:\Users\<username>\AppData\Roaming\DirTreePrinteron first launch.
{
"defaultExpandedLayers":3,
"filterMode":"BLACKLIST",
"rules":[".idea",".git","target"],
"modified":false
}- defaultExpandedLayers: how many layers of folders will be expanded by default when a tree is displayed
- filterMode: how will the ignore rules be applied
- BLACKLIST β exclude listed names
- WHITELIST β only include listed names
- rules: the folders or files you specify
Note
All the settings in config.json can be configured in the settings panel of DirTreePrinter app, if you really want to change the configs manually, restart the app for the changes to take effect.
Generated by DirTreeGenerator:
DirTreePrinter/
βββ src
β βββ main
β β βββ java
β β β βββ unimilk
β β β βββ dirtreeprinter
β β β βββ api
β β β β βββ settings
β β β β β βββ FilterMode.java
β β β β β βββ ISettings.java
β β β β β βββ ISettingsManager.java
β β β β βββ tree
β β β β βββ IDirTreeGenerator.java
β β β β βββ ITreeRenderer.java
β β β β βββ TreeNode.java
β β β βββ backend
β β β β βββ settings
β β β β β βββ JsonSettingsManager.java
β β β β β βββ Settings.java
β β β β β βββ YamlSettingsManager.java
β β β β βββ tree
β β β β β βββ DirTreeGenerator.java
β β β β β βββ TreeRenderer.java
β β β β βββ AppPaths.java
β β β βββ frontend
β β β β βββ export
β β β β β βββ ExportDialog.java
β β β β β βββ ExportPreviewDialog.java
β β β β βββ settings
β β β β β βββ GeneralCard.java
β β β β β βββ IgnoreRulesCard.java
β β β β β βββ ListReorderTransferHandler.java
β β β β β βββ SettingsCards.java
β β β β β βββ SettingsDialog.java
β β β β βββ tree
β β β β β βββ CheckBoxTreeCellEditor.java
β β β β β βββ CheckBoxTreeCellRenderer.java
β β β β β βββ TreeCellClickListener.java
β β β β β βββ TreeDisplay.java
β β β β βββ worker
β β β β β βββ ScanWorker.java
β β β β βββ LoadingOverlayPanel.java
β β β β βββ MainFrontend.java
β β β β βββ RightClickMenu.java
β β β βββ DirTreeApp.java
β β βββ resources
β β βββ icons
β β β βββ icon.ico
β β β βββ icon16.png
β β β βββ icon32.png
β β β βββ icon48.png
β β β βββ icon64.png
β β βββ config.yml
β βββ test
β βββ java
β βββ unimilk
β βββ dirtreeprinter
β βββ backend
β β βββ settings
β β βββ JsonSettingsManagerTest.java
β β βββ SettingsTest.java
β βββ frontend
β βββ tree
β βββ CheckBoxTreeCellRendererTest.java
βββ .gitignore
βββ CHANGELOG.md
βββ LICENSE
βββ pom.xml
βββ README.md
- Java
- Swing
- FlatLaf
- Gson
- Maven
- exe4j
git clone https://github.com/X-xiaohan521/DirTreePrinter.gitmvn clean packageThe executable JAR will be generated in: target/
π Only the latest version is listed here. See
CHANGELOG.mdfor older versions.
- Added a loading animation when scanning folders.
- Added a right-click menu to send folders to ignore rules or open them in file explorer.
- Added a Rescan button to rescan the root folder.
- Added a default expanded layers setting for the tree display.
- Polished overall UI/UX experience.
- Enabled drag-to-reorder for ignore rules.
- Fixed frontend freezing during folder scanning tasks.
- π Report issues: π GitHub Issues
- π‘ Suggest new features: π GitHub Issues
- π¬ Join discussions: π Github discussions
- π§© Contribute code: Fork and submit a π Pull Request
MIT License
Copyright (c) 2026 UniMilk
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
π§ Email: unimilk891@gmail.com
π GitHub: X-xiaohan521
If you find this tool helpful, please star β ths repository or leave your feedback β your support means a lot to me! π