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: Mon, 26 Nov 2007 22:03:49 +0200

> From: reader@newsguy.com
> Date: Mon, 26 Nov 2007 01:33:36 -0600
> 
> 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
> 
> Or if keeping the original for reference is not needed then possibly:
> 
> img-000.jpg
> img-001.jpg
> img-002.jpg
> img-003.jpg

You should be able to use the \, construct to invoke `format' or some
similar function and advance the counter.  See the example in

   (emacs) Regexp Replace

in the Emacs manual.




reply via email to

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