help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Easy way to rename files sequentially?


From: Eli Zaretskii
Subject: Re: Easy way to rename files sequentially?
Date: Sun, 25 Nov 2007 23:12:35 +0200

> From: cothrige <cothrige@yahoo.com>
> Date: Sun, 25 Nov 2007 13:39:45 -0600
> 
> 
> I sometimes have a list of files which I would like to rename both in a
> group and in sequence.  In the past, for very long lists of files with a
> number in the name, e.g. "some random audio file ep 01 of 200.mp3", I
> would use thunar as it will very easily and automatically add a
> sequential number to the front of the names, resulting in 01-xxx.mp3 and
> so on.  Of course, there are many reasons I would rather not have to use
> thunar, and would prefer to be able to do it from within emacs.  I have
> managed to do this a few times using wdired and a keyboard macro, and
> this really isn't too bad.  But it seems there must be a better way to
> rename a list of files and sequentially number them.  Is there some
> relatively easy way to add such a numerical prefix to a list of files?

Try the "% R" command in Dired.  It computes the new name by
regular-expression substitution from the old name.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]