1 Home
Miguel edited this page 2025-02-02 17:33:53 -03:00

Directory Creator

Directory Creator is a WPF application designed to help automate the creation of standardized directory structures for projects. It allows users to define and manage multiple directory structure templates and easily create new project folders following these templates.

Features

  • Create and manage multiple directory structure configurations
  • Create numbered project folders automatically (e.g., "001 - Project Name")
  • Automatically detect the next project number based on existing folders
  • Support for multiple base paths in a single configuration
  • Variable substitution (e.g., {year} for current year)
  • Visual configuration editor for easy template management
  • Support for nested folder structures

Getting Started

Prerequisites

  • Windows Operating System
  • .NET 8.0 or later

Installation

  1. Clone the repository
  2. Build the solution using Visual Studio 2022 or later
  3. Run the application

Configuration

The application uses JSON configuration files stored in the Configurations folder. Each configuration file defines:

  • A description (displayed in the configuration selector)
  • A base path
  • Multiple folder structures, each containing:
    • A base path
    • A list of subfolders to create

Example configuration file:

{
  "description": "Standard Project",
  "basePath": "C:\\Projects",
  "folderStructures": [
    {
      "basePath": "C:\\Projects",
      "subfolders": [
        "Documents",
        "Source",
        "Source\\Backups",
        "Resources",
        "Output"
      ]
    },
    {
      "basePath": "C:\\Archives\\{year}\\Projects",
      "subfolders": []
    }
  ]
}

Usage

  1. Select a configuration from the dropdown menu
  2. The application will automatically suggest the next project number
  3. Enter the project name (it will be prefixed with the project number)
  4. Click "Create Directories" to generate the folder structure
  5. The application will create all specified folders and open the main project folder

Creating/Editing Configurations

  1. Click "Edit Configurations" in the main window
  2. Create a new configuration or select an existing one to edit
  3. Set the configuration name and base path
  4. Add folder structures by clicking "Add Structure"
  5. For each structure:
    • Set the base path
    • Add subfolders as needed
    • Use the folder browser to select paths
  6. Save the configuration

Features in Detail

Automatic Numbering

The application automatically determines the next project number by:

  • Scanning the base directory for existing project folders
  • Identifying folders with the pattern "XXX - Project Name"
  • Finding the last number in a sequence of at least 3 consecutive numbers
  • Suggesting the next number in the sequence

Variable Substitution

The following variables are supported in paths:

  • {year}: Replaced with the current year

Multiple Base Paths

Each configuration can define multiple folder structures with different base paths. This allows:

  • Creating project folders in multiple locations simultaneously
  • Supporting different organizational structures
  • Maintaining archives or backups in separate locations

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.