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. File Manager, dired
  2. Dired Customization
  3. Find Replace Text in Directory
  4. Batch Rename Files
  5. Dired Sort File by Time, Size
  6. Open File in External App
  7. Rename File from Space to Hyphen/Underscore
  8. Convert Image Files in Dired

Shell Topic

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

File Topic

  1. File Manager, dired
  2. Emacs Bookmark
  3. Open Recently Opened
  4. Open File Fast
  5. Open Last Closed File
  6. Open File Path Under Cursor
  7. Open File in External App
  8. Renaming Files

If you have a question, put $5 at patreon and message me.
Or Buy Xah Emacs Tutorial
Or buy a nice keyboard: Best Keyboards for Emacs

Emacs

Emacs Lisp

Misc