# Find and Replace

Similar to the way the Find and Replace function in a text editor works, *Find and Replace* mode lets you perform a batch rename by specifying a text string to search for and another to replace it with.

![](https://3597805814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3XSZSwWow0fDf6fQJobd%2Fuploads%2Fgit-blob-f941d053f9c84b0b443852eb2e18edc0b9780030%2Ffind_and_replace.png?alt=media)

This example has the **Find** string (note the **Old name** field has been replaced with **Find**) set to *img*, and the **Replace** string is set to *IMG*. The preview list indicates the outcome of the batch rename - as you can see, only two of the displayed files will actually change as a result of the rename (they are the two displayed in black - the rest, in grey, won't change).

Ordinarily the search is confined to the filename stem, excluding the file extension. If the **Ignore extension** option is turned off, however, the *Find and Replace* operation will be performed over the whole filename including the extension.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chaoses-ib.gitbook.io/directory-opus/manual/file_operations/renaming_files/advanced_rename/rename_modes/find_and_replace.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
