Following on from the previous dired tips we can do much more in dired. A very powerful feature is that you can switch the dired buffer which lists the files into editable mode. Then you can directly edit file names, links and so on. Here we will look at using dired to rename multiple files in a nice visual way.
Now we will use dired to rename multiple files at the same time. Suppose in some directory we have a bunch of files called
test_foo_02.dat, etc and we wanted to rename them to replace
bar, then we would do the following:
C-x dto enter dired and choose the directory with the files in
C-x C-qto turn dired into editing mode. You can then edit the file names by hand or
barin the dired buffer. This will change the file names
C-c C-cso apply the changes, or
C-c ESCto cancel
The animation below shows this example. Of course you can also manually change the name of the file, as I do for the last file on the list.