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: David Hansen
Subject: Re: Easy way to rename files sequentially?
Date: Mon, 26 Nov 2007 12:49:09 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

On Mon, 26 Nov 2007 01:33:36 -0600 reader@newsguy.com wrote:

> 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

M-x wdired-change-to-wdired-mode RET
C-M-% img RET \,(format "%03d" \#)-img RET
!
C-c C-c

> Or if keeping the original for reference is not needed then possibly:
>
> img-000.jpg
> img-001.jpg
> img-002.jpg
> img-003.jpg

M-x wdired-change-to-wdired-mode RET
C-M-% img-[0-9]+ RET img-\,(format "%03d" \#) RET
!
C-c C-c

David





reply via email to

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