File and Directory Cleanup & Sequencing
renames all files in a fiction writing project to something useful
Prompt
Audit all files and directories in this project to:
1. **Rename** any file or directory with a problematic or unclear name to a clean, descriptive, filesystem-safe name
2. **Assess the ordering** of materials based on content and narrative sequence
3. **Number files** into their correct order within the story
---
## Instructions
### Phase 1: Scan and Understand the Project
Before renaming anything, **read through all materials** to understand:
- The overall narrative structure and sequence of events
- Which manuscript files represent which parts of the story
- How scenes and chapters relate to each other chronologically and narratively
- The logical groupings of supporting materials
This reading pass is essential—you cannot rename or sequence materials without understanding what they contain and how they fit together.
---
### Phase 2: Identify Problematic Names
Review all **files and directories** in:
- `Manuscript Material/`
- `Supporting Material/`
- All subdirectories
Flag any name (file or directory) with these issues:
**Filesystem Problems:**
- Special characters: `& % $ # @ ! * ? " ' < > | : ; / \`
- Parentheses, brackets, or braces: `( ) [ ] { }`
- Leading or trailing spaces
- Multiple consecutive spaces
- Non-ASCII characters (accented letters, symbols, emoji)
- Excessively long names (>80 characters)
**Usability Problems:**
- Vague or generic names (`untitled.md`, `folder1/`, `stuff/`, `new file.md`)
- Timestamps or codes without context (`2024-01-15.md`, `export_ABC123/`)
- Names that don't reflect actual content
- Random or garbled text
- Inconsistent naming patterns
---
### Phase 3: Assess Correct Ordering
Based on your reading of the materials, determine the correct sequence:
**For Manuscript Material:**
- What is the correct narrative order of chapters/scenes?
- Are there any misplaced fragments that belong earlier or later?
- Are there scenes that clearly precede or follow others based on content?
**For Supporting Material:**
- Is there a logical grouping or ordering? (e.g., main characters before secondary, major plot arcs before subplots)
- Would numbered ordering help navigation, or is alphabetical/categorical better?
**Document your assessment:**
- Note the current (disordered) state
- Note the correct sequence based on narrative content
- Flag any ambiguous cases where sequence is unclear
---
### Phase 4: Rename and Number
#### Files
Create replacement filenames that are:
**Filesystem-Safe:**
- Lowercase or Title-Case (be consistent)
- Words separated by hyphens (`-`) or underscores (`_`) — pick one, use it everywhere
- No special characters or spaces
- Reasonable length (under 60 characters)
- Preserve original file extension
**Descriptive and Numbered:**
- Include a sequence number prefix for ordered materials
- Use zero-padded numbers for proper sorting (`01`, `02`, ... `10`, `11` not `1`, `2`, ... `10`, `11`)
- Follow the number with a descriptive name
**Manuscript Material Patterns:**
| Content Type | Pattern | Example |
|--------------|---------|---------|
| Chapter | `XX-chapter-description.md` | `07-the-betrayal.md` |
| Scene/fragment | `XX-scene-description.md` | `03-warehouse-confrontation.md` |
| Prologue/Epilogue | `00-prologue.md`, `99-epilogue.md` | `00-prologue-the-dream.md` |
| Unsorted/unplaced | `XX-draft-description.md` | `15-draft-alternate-meeting.md` |
If a piece's exact position is uncertain but its approximate placement is known, number it accordingly and add a note in your log.
**Supporting Material Patterns:**
| Content Type | Pattern | Example |
|--------------|---------|---------|
| Character bio (main) | `01-character-name-bio.md` | `01-character-elena-bio.md` |
| Character bio (secondary) | `05-character-name-bio.md` | `05-character-innkeeper-bio.md` |
| Plot outline (main arc) | `01-plot-main-arc.md` | `01-plot-revenge-arc.md` |
| Plot outline (subplot) | `03-plot-subplot-name.md` | `03-plot-romance-subplot.md` |
| World notes | `world-topic.md` (alpha order OK) | `world-magic-system.md` |
| Timeline | `00-timeline.md` | `00-timeline-master.md` |
#### Directories
Apply the same principles to directories:
**Problematic:**
- `stuff/`
- `Chapter drafts & notes!/`
- `New Folder (2)/`
**Clean and Numbered (if sequence matters):**
- `01-act-one/`
- `02-act-two/`
- `03-act-three/`
**Clean and Categorical (if sequence doesn't matter):**
- `characters/`
- `world-building/`
- `plot-outlines/`
Rename directories **before** renaming the files inside them (to avoid path errors).
---
### Phase 5: Execute Renames with Git
**Always use `git mv`** to preserve version history:
```bash
# Rename a directory first
git mv "Old Folder Name!/" "01-act-one/"
# Then rename files inside
git mv "01-act-one/Café Scene — Pro&Con!.md" "01-act-one/03-scene-cafe-argument.md"
```
If a name is too broken for `git mv`:
```bash
git rm --cached "broken-name"
mv "broken-name" "new-clean-name"
git add "new-clean-name"
```
**Rename in this order:**
1. Top-level directories first
2. Subdirectories next
3. Files last
This prevents path reference errors during the process.
---
### Phase 6: Update Internal References
After renaming, check for and update:
- Any index files or READMEs that list files
- Cross-references between documents
- Any manifest or table of contents
---
### Phase 7: Commit Changes
Commit with clear messages:
```bash
git commit -m "Rename and sequence Manuscript Material files and directories"
git commit -m "Rename and organize Supporting Material"
```
---
## Output
Produce a **comprehensive cleanup and sequencing log**:
```
# File and Directory Cleanup Log
## Summary
- Total items scanned: [X]
- Directories renamed: [X]
- Files renamed: [X]
- Items resequenced: [X]
- Items already compliant: [X]
---
## Narrative Sequence Assessment
### Determined Chapter/Scene Order:
1. [Content summary] — was `old-name.md`, now `01-new-name.md`
2. [Content summary] — was `another-old.md`, now `02-new-name.md`
3. ...
### Sequence Notes:
- [Any ambiguities, judgment calls, or items needing author confirmation]
---
## Directory Renames
| Original | New | Reason |
|----------|-----|--------|
| `Chapter drafts & notes!/` | `manuscript-drafts/` | Special characters, unclear |
| `stuff/` | `03-act-three/` | Vague; contains act 3 materials |
| ... | ... | ... |
---
## File Renames
| Original | New | Sequence # | Content Summary |
|----------|-----|------------|-----------------|
| `Café Scene — Pro&Con!.md` | `03-scene-cafe-argument.md` | 3 | Alex and Jordan argue about the plan |
| `untitled (2).md` | `07-chapter-marketplace-chase.md` | 7 | Chase scene through the market |
| `char.md` | `01-character-elena-bio.md` | 1 (main char) | Elena's biography |
| ... | ... | ... | ... |
---
## Files Not Renamed
- `00-timeline-master.md` — already compliant
- ...
---
## References Updated
- Updated `index.md`: corrected all file links
- ...
---
## Items Requiring Author Decision
- `fragment-unclear.md` — Could fit in chapter 4 or chapter 6; placed tentatively at position 4.5 as `04b-scene-uncertain.md`
- ...
```
---
## Notes
- **Read first, rename second** — You must understand the narrative to sequence it correctly.
- **Directories before files** — Rename parent directories first to avoid broken paths.
- **Zero-pad numbers** — Use `01`, `02`, etc., so files sort correctly (`10` after `09`, not after `1`).
- **When sequence is ambiguous** — Make your best judgment, document it, and flag for author review.
- **Preserve extensions** — Don't change `.md` unless correcting an error.
- **Consistency is paramount** — Pick conventions and apply them uniformly.
- **No duplicate names** — Verify each new name is unique before renaming.How to use this prompt
- Copy the prompt text above using the copy button.
- Paste it into your preferred AI tool (ChatGPT, Claude, Gemini, etc.).
- Adjust the prompt to fit your specific Writing needs.
AI consultant and software creator helping businesses and creators harness AI through practical solutions and innovative products. Creator of BestPromptIdeas.com.
Reviews
0 reviewsNo reviews yet. Be the first to leave feedback.
Related prompts
View category →KDP New Story Concept Strategist
Your job is to help the user discover a commercially viable Kindle Store category and trope set for a story they may not fully understand yet, starting from whatever fragments, vibes, or intuitions they currently have, while preserving their creative intent.
Line Edit Assessment
Conduct a **line edit assessment** of this fiction manuscript. Evaluate the work at the **paragraph and scene level**, focusing on how the prose flows, how scenes are constructed, consistency issues, and mid-level craft elements.
Resume Builder & Optimizer
Create a tailored, ATS-friendly resume with guided questions, rewrites, and expert optimization for any job or industry.
Precision Proofreader prompt
proofread precisely
Top 10 Effective AI Prompts to Edit a Book Professionally
book editing prompts
ProofRead Your Texts with These 10 ChatGPT Prompts
Boost Clarity And Captivate Your Readers