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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for folder_structure_creator-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4a3dac7a6e21e9c7ea5a9f3f0d80dcc13cf3a1cf973860af5c5a1bb1e7fe70d9
MD5 b532cd35a9efce7f8b9ca0d275e4b544
BLAKE2b-256 5b6e44deded5e0ff6403565951bfd2878211632d28daaf7a3b627bb5bcdee19a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for folder_structure_creator-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 678c95875f6494858b0d0e3a5e2f6fe80a14c62d1b7128007471c34a40b93a68
MD5 66492fc4c9de54d263bae52369bfa9c1
BLAKE2b-256 c359ace43a5a6010ce4ee5927bdd3f87a6b4e6fb19c127510615ccd20ba41fd2

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