Skip to main content

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

  1. Reading the Folder Structure: The script reads a text file where each line represents a folder. Indentation indicates the hierarchy.
  2. Creating Folders: It processes the file to determine the folder structure and creates the folders accordingly.
  3. Identifying the Executable's Directory: The script identifies the directory where it is located, whether it’s frozen (compiled as an executable) or not.
  4. Locating .txt Files: It searches for .txt files in the directory.
  5. Choosing a File: If multiple .txt files are found, it prompts the user to choose one. If there’s only one, it uses that file directly.
  6. Creating Folder Structure: The script creates the folder structure based on the text file.

Installation

  1. Ensure you have Python 3.x installed on your system. You can download it from the official Python website.
  2. Install the folder_structure_creator package using pip:
pip install folder_structure_creator
  1. Ensure there is a .txt file with the folder structure in the same directory as the executable.

Usage

  1. Place a text file of the folder structure in the executable's directory.
  2. Run the script.
python fstruct.py
  1. Follow the prompts if multiple .txt files 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

folder_structure_creator-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

folder_structure_creator-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file folder_structure_creator-0.1.0.tar.gz.

File metadata

File hashes

Hashes for folder_structure_creator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4f4bbdc22211b8135cb54614299ad105b744ad26e577b47d91a320d082eca05b
MD5 8cf3d465bd6cd21e5a15ce4472f15b99
BLAKE2b-256 165000efeb9a21e2e173fd46afa6677212b5602a3cd711fa4bec917d9810f206

See more details on using hashes here.

File details

Details for the file folder_structure_creator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for folder_structure_creator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42a5aa5244507f4fd53696d6c6150f72a33131df50ced4814241cce084f576c1
MD5 b1243a00fb3fd0278cf73cf44d0be19d
BLAKE2b-256 8477654609d1af041998e44550423ed96f9faf5bd284d706705de155f33d0603

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page