File & Folder Generator
Define your project structure once. Reuse it whenever you start a new project. ✨ Features
🚀 CommandsFile & Folder Generator provides three independent commands. Each command operates on the selected Markdown definition containing a dxwiz block. The commands can be used independently; Preview is not required before Generate. File & Folder Generator: PreviewAnalyzes the selected definition and generates an execution report without modifying the target project. The report includes information such as:
Use Preview when you want to inspect the planned result before making changes. File & Folder Generator: GenerateGenerates the folders and files described by the selected definition. Existing files are protected according to the normal generation behavior, while newly required files and folders are created. The execution report shows what was planned and what actually happened. File & Folder Generator: Generate and OverwriteGenerates the defined structure and overwrites existing files when necessary.
The execution report identifies files that were updated as part of the operation. Commands are independentPreview is not required before Generate or Generate and Overwrite. You can choose whichever command matches what you want to do:
📄 Getting StartedCreate or choose a Markdown definition describing the project structure you want to generate. A definition contains a
The Markdown outside the The 🧩 Definition FormatA definition is a normal Markdown ( The definition specifies:
Basic Example
This represents:
|
| Extension | Language / Format |
|---|---|
.cs |
C# |
.css |
CSS |
.env |
Environment variables |
.go |
Go |
.html |
HTML |
.js |
JavaScript |
.json |
JSON |
.jsx |
React JavaScript |
.md |
Markdown |
.ps1 |
PowerShell |
.py |
Python |
.rs |
Rust |
.scss |
SCSS |
.sh |
Shell |
.sql |
SQL |
.ts |
TypeScript |
.tsx |
React TypeScript |
.vue |
Vue |
.yaml |
YAML |
.yml |
YAML |
Supported File Names
Templates can also be selected based on specific file names.
| File name | Purpose |
|---|---|
Dockerfile |
Docker definition |
Dockerfile.backend |
Backend Docker definition |
Dockerfile.frontend |
Frontend Docker definition |
compose.yaml |
Docker Compose |
compose.dev.yaml |
Development Docker Compose |
.dockerignore |
Docker ignore rules |
.gitignore |
Git ignore rules |
The exact starter content is provided by the templates included with the extension.
🏷 Generated File Headers
For every generated file whose file type supports generated headers, File & Folder Generator adds a header identifying the generated file path.
For example:
src/components/Button.tsx
can receive:
// src/components/Button.tsx
The header format depends on the file type.
When a supported template is available, the generated file can contain both:
- The generated file-path header
- Basic starter template content
This makes generated files easier to identify and gives supported file types useful initial content immediately.
👀 Preview
Preview mode lets you inspect the planned operation without modifying the target project.
The generated report can include:
PLAN SUMMARY:
--------------------------
Folders planned: 12
Files planned: 35
Duplicates found: 1
It also displays the planned file structure and warnings.
Preview is optional. It is provided as a convenient way to inspect changes before generation.
🛡 Generation and Existing Files
The extension distinguishes between different outcomes during execution, including:
- ✨ Newly created files
- 📁 Newly created folders
- 🔄 Updated or overwritten files
- ⏭️ Skipped existing files
- ⚠️ Duplicate paths
- ❌ Invalid definitions
Normal Generate operations protect existing files according to the extension's standard generation behavior.
Generate and Overwrite is available when you intentionally want existing files to be replaced.
⚠️ Validation and Duplicate Detection
Definitions are validated before execution.
Duplicate physical paths are detected and reported.
For example:
target: "D:/projects/project-folder"
my-project/
README.md
README.md
The definition contains the same physical path twice.
The execution report identifies the duplicate:
Duplicates found: 1
WARNINGS:
--------------------------
⚠ Duplicate path detected:
D:/projects/project-folder/my-project/README.md
Duplicate detection helps identify accidental repetition in project definitions.
A duplicate warning does not by itself mean that every operation is blocked; the selected command and execution mode determine how the operation proceeds.
📊 Execution Reports
File & Folder Generator produces an execution report for operations.
The report is:
- Opened as a Markdown output file beside the source definition
- Given the
.output.mdsuffix - Opened in VS Code
- Also displayed in the VS Code Output panel
For example:
testfile.md
testfile.output.md
A report can contain:
File & Folder Generator Execution Report
==========================
Mode: GENERATE_AND_OVERWRITE
Status: SUCCESS
Target: D:/projects/project-folder
Validation Status: Valid
Action: Files and folders generated with existing files overwritten
PLAN SUMMARY:
--------------------------
Folders planned: 12
Files planned: 35
Duplicates found: 1
EXECUTION SUMMARY:
--------------------------
Folders created: 0
Files created: 0
Files updated: 35
Files skipped: 0
The report also includes warnings and the resulting file structure.
This provides a clear record of what the extension planned and what actually happened.
📚 Reusable Definitions
Definitions can be stored and reused across projects.
For example:
definitions/
├── react-app.md
├── node-api.md
├── python-api.md
└── cli-tool.md
Each definition can contain documentation together with its corresponding dxwiz project structure.
Reusable definitions make project scaffolding:
- Easy to read
- Easy to review
- Easy to version control
- Easy to share
- Easy to customize
- Consistent across projects
🧪 Complete Example
The following definition demonstrates nested folders, single-line paths, comments, special folder names, infrastructure files, templates, and duplicate detection:
# Example Project
```dxwiz
target: "D:/projects/project-folder"
# Root project folder
my-project/
# Application source
app/
components/
Button.tsx
[id]/
page.tsx
(admin)/
dashboard/
page.tsx
styles/
main.css
# Single-line path
public/index.html
# Infrastructure files
infra/
Dockerfile
compose.yaml
# Project configuration
.gitignore
package.json
README.md
```
The resulting structure is:
project-folder/
└── my-project/
├── app/
│ ├── components/
│ │ └── Button.tsx
│ ├── [id]/
│ │ └── page.tsx
│ ├── (admin)/
│ │ └── dashboard/
│ │ └── page.tsx
│ └── styles/
│ └── main.css
├── public/
│ └── index.html
├── infra/
│ ├── Dockerfile
│ └── compose.yaml
├── .gitignore
├── package.json
└── README.md
Supported files can receive their corresponding starter template content and generated file-path headers.
🧭 Recommended Usage
Choose the command that matches your intended operation:
- Create or choose a definition.
- Use Preview if you want to inspect the planned changes.
- Use Generate to create the project while protecting existing files.
- Use Generate and Overwrite when existing files should intentionally be replaced.
- Review the execution report for validation results, warnings, duplicates, and execution statistics.
Preview is optional; the three commands can be used independently.
🗺 Roadmap
Possible future improvements include:
- Additional language and framework templates
- Additional validation rules
- Template variables
- Custom template packs
- Remote or shared definitions
The roadmap may evolve based on user feedback and project needs.
🤝 Contributing
Contributions are welcome.
You can help by:
- Adding templates
- Adding project definitions
- Improving parsing and validation
- Improving documentation
- Fixing bugs
- Suggesting new features
Please see CONTRIBUTING.md for contribution guidelines.
🆘 Support
For questions, issues, feature requests, or other support:
- See
SUPPORT.md - Report bugs through the project's issue tracker
- Review the project documentation and examples
🏢 About
File & Folder Generator is an open-source project created and maintained by DXWIZ.
Learn more about DXWIZ at dxwiz.com.
For additional information, visit the DXWIZ Contact page.
📜 License
File & Folder Generator is licensed under the MIT License.
See LICENSE for the complete license text.
⭐ Why File & Folder Generator?
Starting a project often means repeating the same setup:
- Creating directories
- Creating standard files
- Adding starter code
- Setting up configuration files
- Recreating familiar project structures
File & Folder Generator turns that repetitive work into reusable Markdown definitions.
Define once.
Preview when you want to inspect.
Generate consistently.