Directory-Tree-Generator is a PowerShell script that generates an interactive, collapsible HTML tree view of the current directory and all its subfolders and files β complete with icons, expandable folders, and file links.
π Visualise file structures instantly. No installation. No dependencies. Just PowerShell.
- Recursively scans the current folder and all subfolders
- Generates a clean, interactive HTML file (
Tree.html
) - Supports:
- Folder and file icons (via Font Awesome)
- Colored icons for common file types (PDF, Word, Excel, etc.)
- Clickable links to open files or folders
- Expand/collapse all controls
- Lightweight and responsive HTML output
- No external dependencies β pure PowerShell + HTML
- Download
Generate-DirectoryTree.ps1
- Open PowerShell in the folder you want to index
- Run:
.\Generate-DirectoryTree.ps1
Open the generated Tree.html in your browser.
You can also pass a custom output filename:
.\Generate-DirectoryTree.ps1 -OutFile "MyProjectMap.html"
This project is licensed under the MIT License.
You are free to use, modify, and redistribute β just retain the original attribution.
Pull requests, feedback, and ideas are welcome. Feel free to fork the repo or open an issue with enhancements!