From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.help Subject: Re: Easy way to rename files sequentially? Date: Mon, 26 Nov 2007 12:49:09 +0000 Organization: disorganized Message-ID: <87y7cl6uka.fsf@localhorst.mine.nu> References: <87ejeexgfy.fsf@celephais.home.net> <871waeroap.fsf@newsguy.com> <8763zpwje7.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 1196081683 18347 80.91.229.12 (26 Nov 2007 12:54:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Nov 2007 12:54:43 +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 13:54:50 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 1IwdU6-0008QE-QE for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Nov 2007 13:54:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwdTr-0007t2-TP for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Nov 2007 07:54:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IwdTd-0007sL-4X for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 07:54:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IwdTb-0007s5-EL for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 07:54:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwdTb-0007s2-Aw for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 07:54:15 -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 1IwdTa-00057H-UX for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 07:54:15 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IwdT5-0001G0-IQ for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 12:53:43 +0000 Original-Received: from e178049131.adsl.alicedsl.de ([85.178.49.131]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Nov 2007 12:53:43 +0000 Original-Received: from david.hansen by e178049131.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Nov 2007 12:53:43 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 34 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178049131.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:H+s2IM/CLJ+LeGxJEanROrhBiRQ= 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:49543 Archived-At: 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