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】.

Spent a few hours here?

Emacs Tutorial

Emacs Init

Emacs Keys

Elisp Basics

Elisp Examples

Elisp Advanced

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