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: Thierry Volpiatto
Subject: Re: Easy way to rename files sequentially?
Date: Tue, 27 Nov 2007 22:35:32 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.60 (gnu/linux)

jadamson@partners.org (Joel J. Adamson) writes:

> reader@newsguy.com writes:
>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>>> You should be able to use the \, construct to invoke `format' or some
>>> similar function and advance the counter.  See the example in
>>
>> Thats not available in dired either is it?
>
> M-x wdired-change-to-wdired-mode
>
> and then you can edit filenames freely as you would edit a file,
> i.e. you can use any of the search and replace functions.  To rename
> files sequentially, as long as they are in the order you expect them to
> be, you can use a regex with "\#" which represents the number of
> substitutions.
>
> Joel

It work really well with "\#", thank you Joel.
After wdired-change-to-wdired-mode, i did :

C-M % RET
query-replace-regex: [a-z0-9]*.txt RET thierry\#.txt

with some files like:
riri.txt
titi2.txt
toto23.txt

So which one is the counter, "\" or "#" ?

-- 
A + Thierry




reply via email to

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