From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: cothrige Newsgroups: gmane.emacs.help Subject: Re: Easy way to rename files sequentially? Date: Wed, 28 Nov 2007 03:48:43 GMT Organization: BellSouth Internet Group Message-ID: References: <87ejeexgfy.fsf@celephais.home.net> <871waeroap.fsf@newsguy.com> NNTP-Posting-Host: dough.gmane.org X-Trace: ger.gmane.org 1196252827 27444 80.91.229.10 (28 Nov 2007 12:27:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2007 12:27:07 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 28 13:32:48 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from mail-forward.uio.no ([129.240.10.42]) by dough.gmane.org with esmtp (Exim 4.50) id 1IxKwT-0004d2-Js for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Nov 2007 12:18:57 +0100 Original-Received: from mail-mx8.uio.no ([129.240.10.38]) by pat.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1IxEkB-0002qR-NW for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Nov 2007 05:41:51 +0100 Original-Received: from lists.gnu.org ([199.232.76.165]) by mail-mx8.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1IxEjw-0000Wh-GW for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Nov 2007 05:41:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IxEix-0003LS-4M for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Nov 2007 23:40:35 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!news.glorb.com!bigfeed2.bellsouth.net!bignumber.bellsouth.net!news.bellsouth.net!bignews4.bellsouth.net.POSTED!fb0cad44!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: slrn/0.9.8.1pl1 (Debian) Original-Lines: 46 Original-X-Complaints-To: abuse@bellsouth.net X-Abuse-Info: Please forward a copy of all headers for proper handling Original-X-Trace: npbhgpngjbkmjfegdbdpiflmbcekedmfhojhikkbagflhcbocnmjjpnliohcldleaklaibpkiejbkedifkhknhclgnebhmkhieljnheokeinfocpohpokmcfepkfjaomhbaloffneedcobcigghbjjfoaiemglci Original-NNTP-Posting-Date: Tue, 27 Nov 2007 22:48:43 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:154185 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 X-UiO-SPF-Received: Received-SPF: pass (mail-mx8.uio.no: domain of gnu.org designates 199.232.76.165 as permitted sender) client-ip=199.232.76.165; envelope-from=help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org; helo=lists.gnu.org; X-UiO-ClamAV-Virus: No X-UiO-Spam-info: not spam, SpamAssassin (score=0.4, required=5.0, autolearn=disabled, FORGED_YAHOO_RCVD=1.408,RCVD_IN_DNSWL_LOW=-1) X-UiO-Scanned: F4E04F43C812DA35FADDB06440F9829DE8B84BB6 X-UiO-SPAM-Test: remote_host: 199.232.76.165 spam_score: 4 maxlevel 200 minaction 2 bait 0 mail/h: 69 total 27276 max/h 69 blacklist 0 greylist 0 ratelimit 0 Xref: news.gmane.org gmane.emacs.help:49618 Archived-At: On 2007-11-26, reader@newsguy.com wrote: > Eli Zaretskii writes: > > 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 > Yes, this is something like what I was thinking about. Specifically, I tend to find myself faced with a list of mp3s which are episodes in a longer whole, perhaps a radio play. They will look something like this: Paul Temple and the Gilbert Case ep 01 of 08.mp3 Paul Temple and the Gilbert Case ep 02 of 08.mp3 Paul Temple and the Gilbert Case ep 03 of 08.mp3 and so on. What I usually want is: 01-Gilbert_Case.mp3 02-Gilbert_Case.mp3 and such. What I am doing now is using wdired and then using a keyboard macro to record the moving of the 01 to the front of the file and then the removal of the rest of file and then just replaying that 7 times for the rest. However, that is a bit limited to files which are identical in terms of placement of the number. If the files are less consistent, and many may be, then the macro is not very useful, or at least much, much harder to use. For that reason I had hoped that perhaps a more proper and flexible way may exist. Patrick