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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for folder_structure_creator-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6888be055f2b94a7e2a9b0bf98fdf932b54c0f76ee141fa853dc36f26c76f5b1
MD5 3ab413220d84ac023a7c7112f5ac6578
BLAKE2b-256 7ddf69f942a240df76049aadd7f4f8803f0c845b9c9fd155f0bb8e6c34187337

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for folder_structure_creator-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c848c8bfc8b8d33c438e3c77e411f6de5924020a9eed2ed1cf33c1590c34687
MD5 aece958b2447e9aafb956bf1edc37553
BLAKE2b-256 9abd971225040345155e6927915f11098ee5c66dfd606697323c1212dbfc43bd

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