1

new user here.

I am wondering- can somebody walk me through how to do the following:

In a given directory I have files that look like this

fluc_sk2_556.png
even_sk2_922.png

I would like, with minimal effort, to move the 3 digits to the front of the filename e.g.

556_fluc_sk2_.png
922_even_sk2_.png

How to do this? Thank you so much!

4

In dired, type C-xC-q to switch to editable dired mode.

Start query-replace-regexp with C-M-%

Enter \([^ ]+\)_\([0-9]+\).png as the search pattern, and \2_\1_.png as the replacement.

Type y to replace a single instance, or ! to replace all instances.

Type C-cC-c to save the changes.

0

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .