# Batch operations (rewrites) on multiple files

**URL:** <https://forum.cursor.com/t/batch-operations-rewrites-on-multiple-files/15789>\
**Category:** Feature Requests\
**Created:** [September 9, 2024, 7:27pm UTC](https://forum.cursor.com/t/batch-operations-rewrites-on-multiple-files/15789 "2024-09-09T19:27:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lcoderre](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@lcoderre](https://forum.cursor.com/u/lcoderre)\
**Post date:** [September 9, 2024, 7:27pm UTC](https://forum.cursor.com/t/batch-operations-rewrites-on-multiple-files/15789/1 "2024-09-09T19:27:41Z")

</div>

I’d like to request a feature that allows batch operations or automated rewrites across multiple files,

**Current Limitations:**

Currently, applying changes or generating content across multiple files requires adding each file individually to the context. This process is cumbersome, especially for large codebases.

**Desired Functionality:**

Enable a way to specify groups of files dynamically, such as:

- All open files (e.g. `@openFiles`)
- All files matching search results (e.g. `@searchResults`)
- All files with unstaged changes in the git workspace (e.g. `@gitUnstagedFiles`)

**Examples:**

1. **Renaming Call Sites:**  
I might update a custom hook property and want all call sites across the codebase to be rewritten. The default refactor tool would make the callsites look like:

2. **Generating Documentation:**  
Suppose I want to generate official documentation for all components under `src/components`. Instead of manually adding each file, I could open all files in that directory, and use a command like `@openFiles` to include all relevant files in my prompt, enabling automated doc generation for each component.

This functionality would greatly enhance productivity by allowing automated operations on multiple files simultaneously, without the need for manual file selection.

Thank you!  
Laurens.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 18, 2026, 10:15am UTC](https://forum.cursor.com/t/batch-operations-rewrites-on-multiple-files/15789/2 "2026-06-18T10:15:49Z")

</div>

Closed on June 18, 2026, 10:15am UTC


