This Python script provides an intuitive graphical user interface (GUI) to create folder structures dynamically. Users can select a base directory and define a folder hierarchy using indentation. The script then generates the folders accordingly.
- ✅ User-friendly GUI built with Tkinter.
- ✅ Directory selection via a file browser.
- ✅ Real-time text input for defining folder structures.
- ✅ Error handling for invalid paths.
- ✅ Works across platforms (Windows, macOS, Linux).
Ensure you have the following installed:
- Python 3.6 or later
- Tkinter (Included with standard Python installations)
Clone or download the repository:
git clone https://github.com/your-username/folder-generator.git
cd folder-generatorInstall dependencies (if needed):
pip install tk- Open a terminal or command prompt.
- Navigate to the script folder.
- Execute:
python folder_generator.py- Click the "Browse" button to select the base directory where the folders should be created.
- Type your desired folder structure in the text box.
- Use 2 spaces per indentation level to define subfolders.
- Example:
project-name
src
hello
new
one
- The script will generate the folder structure in the selected base directory.
- A confirmation message will appear upon successful creation.
project-name
docs
src
assets
components
pages
utils
tests
config
build
Base Directory/
project-name/
docs/
src/
assets/
components/
pages/
utils/
tests/
config/
build/
-
Folders not created properly:
- Ensure you are using 2 spaces per indentation level.
- Avoid mixed indentation (spaces vs tabs).
-
Script not running:
- Ensure Python is installed and added to your system PATH.
-
Incorrect base directory:
- Verify the selected path in the GUI.
Contributions are welcome! Fork the repository and submit a pull request with improvements or additional features.
Developed by Jal Bafana.
Happy coding! 🚀