Skip to content

Benjamest/Directory-Tree-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Directory-Tree-Generator

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.


πŸ”§ Features

  • 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

πŸš€ Usage

  1. Download Generate-DirectoryTree.ps1
  2. Open PowerShell in the folder you want to index
  3. 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"

πŸ“ License

This project is licensed under the MIT License.

You are free to use, modify, and redistribute β€” just retain the original attribution.

🀝 Contributing

Pull requests, feedback, and ideas are welcome. Feel free to fork the repo or open an issue with enhancements!

About

Generate a HTML directory tree / map of content to assist in navigating complex folder structures.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published