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.2.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.2.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for folder_structure_creator-0.2.0.tar.gz
Algorithm Hash digest
SHA256 863b36ea3b7d2255b527bcd948b571e95ce0c8e4670e2236180721e6ebb08a8d
MD5 7fc19016d81bad845aa1ffa89d4c614f
BLAKE2b-256 7c693f5e234c2b8393c33bde6af80d8bdd9677936f76fe4960191d976e0bc788

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for folder_structure_creator-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94c6bab933348011010853ec6bcee734b102f716b062963d83e3f988501c3cc6
MD5 d34a9ce3ce10997ec6c0470e1bd7479a
BLAKE2b-256 62457715d7c5b38a685ac9f221b2934127a4f3f268a6cd7d20e1937bcc0cba54

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