Folder Structure Viewer is a Python script that displays the hierarchical structure of a given folder and optionally exports it to a .txt
file.
Currently a simple CLI tool, open for future enhancements.
- π Visualizes folder and file hierarchy
- π Exports structure to a
.txt
file - π« Handles permission and missing folder errors gracefully
Clone the repository and navigate to the project folder:
git clone https://github.com/hanscmd/FolderStructureViewer.git
cd FolderStructureViewer
No external dependencies required β uses Python's built-in libraries.
Run the script using Python:
python Structure.py
Enter the full path to the folder when prompted:
Enter the full path to the folder: C:\Users\Documents\MyFolder
Youβll see the folder structure printed in the terminal, like this:
MyFolder/
βββ Subfolder1/
β βββ file1.txt
βββ Subfolder2/
β βββ file2.docx
βββ file3.pdf
Then choose whether to export the structure to a .txt
file.
You can test the script by creating a sample folder with nested files and running:
python Structure.py
Feel free to fork the repo and contribute improvements!
This project is licensed under the MIT License β see the LICENSE file for details.