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.
  4. When done, wdired-finish-editCtrl+c Ctrl+c】 to commit the changes.

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

You can use find replace when in edit mode. For example, Alt+x query-replace or Alt+x query-replace-regexp.

〔►see Emacs: Find and Replace Commands

Dired topics

  1. Emacs: File Manager, dired
  2. Emacs: Dired Customization
  3. Emacs: Find Replace Text in Directory
  4. Emacs: Batch Rename Files
  5. Emacs: Sort File by Time, Size, in Dired
  6. Emacs: Open File in External App
  7. Emacs: Rename File from Space to Hyphen/Underscore
  8. Emacs: Convert Image Files in Dired

Shell Topic

  1. Emacs: Run Shell in Emacs
  2. Why Run Shell in Emacs?
  3. Emacs: Difference between shell, term, eshell
  4. Emacs: M-x eshell
  5. Emacs: View Linux man Page
  6. Emacs: Interactive Abbrev
  7. Emacs: File Manager, dired
  8. Emacs: Batch Rename Files
  9. Linux: Basic Shell Commands
Like it? Buy Xah Emacs Tutorial. Thanks.