From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: Easy way to rename files sequentially? Date: Tue, 27 Nov 2007 22:35:32 +0100 Message-ID: <871wabv0bf.fsf@thievol.homelinux.org> References: <87ejeexgfy.fsf@celephais.home.net> <871waeroap.fsf@newsguy.com> <8763zpwje7.fsf@newsguy.com> <87bq9fsb1f.fsf@W0053328.mgh.harvard.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196199277 17957 80.91.229.12 (27 Nov 2007 21:34:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 Nov 2007 21:34:37 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: jadamson@partners.org (Joel J. Adamson) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 27 22:34:42 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ix84e-0002FA-0B for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Nov 2007 22:34:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ix84O-0006vW-NG for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Nov 2007 16:34:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ix846-0006uc-Io for help-gnu-emacs@gnu.org; Tue, 27 Nov 2007 16:33:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ix844-0006tP-Eg for help-gnu-emacs@gnu.org; Tue, 27 Nov 2007 16:33:58 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ix843-0006sy-UP for help-gnu-emacs@gnu.org; Tue, 27 Nov 2007 16:33:56 -0500 Original-Received: from nf-out-0910.google.com ([64.233.182.188]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ix842-0007sQ-FT for help-gnu-emacs@gnu.org; Tue, 27 Nov 2007 16:33:55 -0500 Original-Received: by nf-out-0910.google.com with SMTP id f5so1079188nfh for ; Tue, 27 Nov 2007 13:33:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:to:cc:subject:references:face:date:in-reply-to:message-id:user-agent:mime-version:content-type:from; bh=alpEinDaEkcddF+FtwrVWsIrHkulAKHG1B6X6CGksog=; b=U+qJ8P4XqaukZ8NFisZJz9n+LYmU+Ea8+dgYPA9s8PNnpbQtqNw+ON/MPgenGa29GHG1eaV6Kb6wlF3biFGHkOxn7hhzjzBzVKb6eoh8LAXsAfDVgv57OiSS+fv1dmqey9Js/kxQ2/Nwm84HR4xfG6J2YtRJ70msg0KbQVOZGqU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:to:cc:subject:references:face:date:in-reply-to:message-id:user-agent:mime-version:content-type:from; b=NcM/VnqS5qdMWTeRK8rdjgLSZ33EMHbak9TZ6mzcC83WGBssoZckDDyriS+GAcCxpTk2tziiH/iZUSb+fxqLH3FjuRmx/+dC2Y8o6BCngtvgNKjFyaRWgpaGhnufq4PnlbtSMF4WH0jvjIUOCRMxxZ5TjX9Xnhq7Sb6V78wzhHo= Original-Received: by 10.86.58.3 with SMTP id g3mr4227520fga.1196199231699; Tue, 27 Nov 2007 13:33:51 -0800 (PST) Original-Received: from thievol.homelinux.org ( [88.141.102.184]) by mx.google.com with ESMTPS id g28sm5222434fkg.2007.11.27.13.33.47 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 27 Nov 2007 13:33:48 -0800 (PST) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEUAAAD/eiojJC8HDgL9 q6CxcyAADQCPoKCbKDEHHjqGqpmkAAACZklEQVQ4jWVTwW7TQBAdZSSL61Jb8jFyVSXcth5inKPF RvSImwTtMSKSPwCoLG44xtKeyal/y9sN1G47x3meN7PvPdNZEzVNQzwTYhGtz8I6EnSJtUQHotni nWYSNA5ciFARkIK0Xvx8LBpmKRppDgyaI+YifLduf54bmpPkgQj0fp6Z1237XTTLyphtoanR4ktr Wv9p27kw7+xQ/WpI+LcxqcYOzhbtJ4x0tjNb0KxMUsdXOc7K2odsHvHK1upOSGLrXFdhZIZR84W4 BJBoKpVDxR9FBvSrnjnfd0ppulW+YuN2CYDNFu8fag90vm8HZSq1aX/sLS50ygO+n4qAVrk26+pU S+c7AehzKfvBnrLM2fi+BNNbodtKpXgudtus/VamXeU/3TKVddpDbxCc1o/nslr6fjKn4AEkI1Gn PJOhwjal7kPrUhKn17LcVbIKq8di3LWssU+cu6Zp3cQVtOg11GYINOEaIE3v/WQ9HeAPldr30TEk Y1rvoYnNF3O+ZOZpiCFm0gPwZh9IRrayUm5nHj4TFxgRfgJm0HQ/mHsfDSyZ7C9NEENk6YTlcbzq pg6WbSHezsp6BIYLcHej3D7ejKKsrPeyU8kN+ICPK4KVXZdmYTIdFYHzKlVpfwgpSMYdy770KdgW pUf6iVgS2DbIl0JWJoAuA3ttKifRREjNF6BLeqHjFIi+eiCxIs/8gKpHHx343fAzLGqOiA5iLi+c wj+ZIwcswZBJ+Zin7jqwPANY8h1+h+00U6HPOsdV5opelrDXwvTRK2C2dC/S+e/cN9bV6vQawA+R 1Fa/7vtXIAb/c/MXBLaluuFkJS8AAAAASUVORK5CYII= In-Reply-To: <87bq9fsb1f.fsf@W0053328.mgh.harvard.edu> (Joel J. Adamson's message of "Tue\, 27 Nov 2007 15\:12\:12 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49593 Archived-At: jadamson@partners.org (Joel J. Adamson) writes: > reader@newsguy.com writes: > >> Eli Zaretskii 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