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: cothrige
Subject: Re: Easy way to rename files sequentially?
Date: Wed, 28 Nov 2007 03:48:43 GMT
User-agent: slrn/0.9.8.1pl1 (Debian)

On 2007-11-26, address@hidden <address@hidden> wrote:
> Eli Zaretskii <address@hidden> writes:
>
> So something like:
>
> img-0987.jpg
> img-9027.jpg
> img-1237.jpg
> img-0007.jpg
>
> Might become:
>
> 000-img-0987.jpg
> 001-img-9027.jpg
> 002-img-1237.jpg
> 003-img-0007.jpg
>

Yes, this is something like what I was thinking about.  Specifically,
I tend to find myself faced with a list of mp3s which are episodes in
a longer whole, perhaps a radio play.  They will look something like
this:

Paul Temple and the Gilbert Case ep 01 of 08.mp3
Paul Temple and the Gilbert Case ep 02 of 08.mp3
Paul Temple and the Gilbert Case ep 03 of 08.mp3

and so on.

What I usually want is:

01-Gilbert_Case.mp3
02-Gilbert_Case.mp3 

and such.

What I am doing now is using wdired and then using a keyboard macro to
record the moving of the 01 to the front of the file and then the
removal of the rest of file and then just replaying that 7 times for
the rest.  However, that is a bit limited to files which are identical
in terms of placement of the number.  If the files are less
consistent, and many may be, then the macro is not very useful, or at
least much, much harder to use.  For that reason I had hoped that
perhaps a more proper and flexible way may exist.

Patrick


reply via email to

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