A tool to create folder structures based on text files
Project description
Folder Structure Creator
This Python script reads a text file containing a folder structure and creates the corresponding folders on your file system.
How It Works
- Reading the Folder Structure: The script reads a text file where each line represents a folder. Indentation indicates the hierarchy.
- Creating Folders: It processes the file to determine the folder structure and creates the folders accordingly.
- Identifying the Executable's Directory: The script identifies the directory where it is located, whether it’s frozen (compiled as an executable) or not.
- Locating
.txtFiles: It searches for.txtfiles in the directory. - Choosing a File: If multiple
.txtfiles are found, it prompts the user to choose one. If there’s only one, it uses that file directly. - Creating Folder Structure: The script creates the folder structure based on the text file.
Installation
- Ensure you have Python 3.x installed on your system. You can download it from the official Python website.
- Install the
folder_structure_creatorpackage using pip:
pip install folder_structure_creator
- Ensure there is a .txt file with the folder structure in the same directory as the executable.
Usage
- Place a text file of the folder structure in the executable's directory.
- Run the script.
python fstruct.py
- Follow the prompts if multiple
.txtfiles are found.
Your .txt file should look like this
ParentFolder
ChildFolder1
SubChildFolder1
ChildFolder2
Requirements
- Python 3.x
Notes
- The script can handle both spaces and tabs for indentation.
- Ensure the .txt file with the folder structure is correctly formatted.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file folder_structure_creator-0.4.0.tar.gz.
File metadata
- Download URL: folder_structure_creator-0.4.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6888be055f2b94a7e2a9b0bf98fdf932b54c0f76ee141fa853dc36f26c76f5b1
|
|
| MD5 |
3ab413220d84ac023a7c7112f5ac6578
|
|
| BLAKE2b-256 |
7ddf69f942a240df76049aadd7f4f8803f0c845b9c9fd155f0bb8e6c34187337
|
File details
Details for the file folder_structure_creator-0.4.0-py3-none-any.whl.
File metadata
- Download URL: folder_structure_creator-0.4.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c848c8bfc8b8d33c438e3c77e411f6de5924020a9eed2ed1cf33c1590c34687
|
|
| MD5 |
aece958b2447e9aafb956bf1edc37553
|
|
| BLAKE2b-256 |
9abd971225040345155e6927915f11098ee5c66dfd606697323c1212dbfc43bd
|