Find and replace across lots of files in emacs:
M-x find-name-dired: prompts for a root directory and a filename pattern.
Use t to "toggle mark" for all files found.
Use Q for "Query-Replace in Files...": prompts for query/substitution regexps.
Proceed with query-replace-regexp: SPACE to replace and move to next match, n to skip a match, etc.
Press C-x s to save buffers. (then use y, n or ! to save all at once)
To rename multiple files in emacs:
Alt+x dired to go to the directory.
Alt+x dired-toggle-read-only 【C-x C-q】.
Then, just edit the file names.
When done, wdired-finish-edit 【C-c C-c】 to commit the changes.
No comments:
Post a Comment