Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 973 Bytes

README.md

File metadata and controls

29 lines (15 loc) · 973 Bytes

Directory Tree Generator

This Python script generates a visual representation of a directory tree, either printing it to the console or saving it to a file. It can be useful for documenting the structure of a project, particularly when you want to include the directory layout in documentation or README files.

Features

  • Recursively prints the directory tree starting from a specified root directory.
  • Saves the directory tree structure to a specified text file with UTF-8 encoding.

Usage

  1. Run the script:

    You can run the script directly by executing it with Python:

    python genrator.py <directory> <output_file>
    
    

Replace genrator.py with the actual name of your Python file.

  • : The root directory from which to start the tree.
  • <output_file>: The name of the output file where the directory structure will be saved.
python genrator.py C:\Projects\Python\ project_structure.txt