Emacs: Batch Rename Files

By Xah Lee. Date: . Last updated: .

To rename multiple files in emacs, the most easy way is:

  1. Alt+x dired to go to the directory.
  2. Alt+x dired-toggle-read-onlyCtrl+x Ctrl+q】.
  3. Then, just edit the file names. (You can use Alt+x query-replace or Alt+x query-replace-regexp [see Emacs: Find Replace in Current File] or rectangle commands. [see Emacs: Edit Column Text, Rectangle Commands])
  4. When done, wdired-finish-editCtrl+c Ctrl+c】 to commit the changes.

To abort, Alt+x wdired-abort-changesCtrl+c Ctrl+k】.

Put $5 at https://www.patreon.com/xahlee , or goto paypal.com and pay to Xah@XahLee.org . Message me on XahLee discord, say so, ask me questions.
Or Buy Xah Emacs Tutorial

Emacs Tutorial

Emacs Init

Emacs Keys

ELisp

ELisp Examples

ELisp Write Major Mode


Emacs Tutorial

Quick Start

Manage Windows

File

Buffer

Find Replace

Copy/Paste

Unicode

Whitespace

Rectangle Edit

Line Wrap

Shell

View Special File

Editing Brackets

Org Mode

HTML

Emacs Efficiency

Misc