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 11:56:52 -0600 Organization: Still searching... Message-ID: <87ve7ox53v.fsf@newsguy.com> References: <87ejeexgfy.fsf@celephais.home.net> <871waeroap.fsf@newsguy.com> <8763zpwje7.fsf@newsguy.com> <87y7cl6uka.fsf@localhorst.mine.nu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196099868 24554 80.91.229.12 (26 Nov 2007 17:57:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Nov 2007 17:57:48 +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 18:57:52 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 1IwiDQ-0001l8-C1 for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Nov 2007 18:57:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwiDB-0001Er-Fo for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Nov 2007 12:57:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IwiCu-0001EA-2Z for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 12:57:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IwiCr-0001Cz-Lg for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 12:57:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwiCr-0001Cw-Fe for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 12:57:17 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IwiCq-000327-Q4 for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 12:57:17 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IwiCh-0002S3-L6 for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 17:57:07 +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 17:57:07 +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 17:57:07 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 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:h3GD9n1Nukb2w9C2PzeDvMO+8ro= 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:49548 Archived-At: David Hansen writes: > 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 Thanks for showing the method... I was hoping to do this from plain dired mode and that is what my input has been about. I didn't want to have to switch back and forth from wdired to have access to all the normal dired tools. Is it possible to do that from normal dired mode? I know some of methods you used will not work in dired but is there anyway at all to accomplish sequential numbering from dired?