Function: dired-do-rename-regexp
dired-do-rename-regexp is an autoloaded, interactive and byte-compiled
function defined in dired-aux.el.gz.
Signature
(dired-do-rename-regexp REGEXP NEWNAME &optional ARG WHOLE-NAME)
Documentation
Rename selected files whose names match REGEXP to NEWNAME.
With non-zero prefix argument ARG, the command operates on the next ARG files. Otherwise, it operates on all the marked files, or the current file if none are marked.
As each match is found, the user must type a character saying
what to do with it. For directions, type <f1> (help-command) at that time.
NEWNAME may contain \<n> or \& as in query-replace-regexp.
REGEXP defaults to the last regexp used.
With a zero prefix arg, renaming by regexp affects the absolute file name. Normally, only the non-directory part of the file name is used and changed.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/dired-aux.el.gz
;;;###autoload
(defun dired-do-rename-regexp (regexp newname &optional arg whole-name)
"Rename selected files whose names match REGEXP to NEWNAME.
With non-zero prefix argument ARG, the command operates on the next ARG
files. Otherwise, it operates on all the marked files, or the current
file if none are marked.
As each match is found, the user must type a character saying
what to do with it. For directions, type \\[help-command] at that time.
NEWNAME may contain \\=\\<n> or \\& as in `query-replace-regexp'.
REGEXP defaults to the last regexp used.
With a zero prefix arg, renaming by regexp affects the absolute file name.
Normally, only the non-directory part of the file name is used and changed."
(interactive (dired-mark-read-regexp "Rename"))
(dired-do-create-files-regexp
#'dired-rename-file
"Rename" arg regexp newname whole-name dired-keep-marker-rename))