From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: reader@newsguy.com Newsgroups: gmane.emacs.help Subject: Re: Easy way to rename files sequentially? Date: Mon, 26 Nov 2007 01:33:36 -0600 Organization: Still searching... Message-ID: <8763zpwje7.fsf@newsguy.com> References: <87ejeexgfy.fsf@celephais.home.net> <871waeroap.fsf@newsguy.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196062469 25660 80.91.229.12 (26 Nov 2007 07:34:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Nov 2007 07:34:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 26 08:34:36 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 1IwYUF-0007Qv-Fn for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Nov 2007 08:34:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwYU0-00008w-Ey for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Nov 2007 02:34:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IwYTa-0008Ns-H3 for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 02:33:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IwYTY-0008Lr-SJ for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 02:33:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwYTY-0008LF-DM for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 02:33:52 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IwYTX-0000xK-Rq for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 02:33:52 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IwYTW-0006rk-HS for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 02:33:50 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IwYTP-0001aV-HG for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 07:33:43 +0000 Original-Received: from adsl-76-224-105-8.dsl.emhril.sbcglobal.net ([76.224.105.8]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Nov 2007 07:33:43 +0000 Original-Received: from reader by adsl-76-224-105-8.dsl.emhril.sbcglobal.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Nov 2007 07:33:43 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-76-224-105-8.dsl.emhril.sbcglobal.net User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:+G04BtpCaOd+/6hE+WOSfVsJLB8= X-detected-kernel: by mx20.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:49535 Archived-At: Eli Zaretskii writes: >> From: reader@newsguy.com >> Date: Sun, 25 Nov 2007 15:46:38 -0600 >> >> Eli Zaretskii writes: >> >> > Try the "% R" command in Dired. It computes the new name by >> > regular-expression substitution from the old name. >> >> Eli, probably obvious to you but how does that method allow sequential >> numbering? > > I must admit don't really understand what did you mean by ``sequential > numbering''. How about an example? I took the meaning from the OP: "I sometimes have a list of files which I would like to rename both in a group and in sequence." 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