From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Patrick Drechsler Newsgroups: gmane.emacs.help Subject: dired renaming files: replacing mutliple whitespaces with underscores Date: Mon, 30 Apr 2007 12:27:48 +0200 Organization: none Message-ID: <877irup36j.fsf@pdrechsler.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1177929825 14035 80.91.229.12 (30 Apr 2007 10:43:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 Apr 2007 10:43:45 +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 Apr 30 12:43:44 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 1HiTM8-0000Uv-Cm for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Apr 2007 12:43:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HiTSG-00063Y-RY for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Apr 2007 06:50:05 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!news-lond.gip.net!news.gsl.net!gip.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsinpeer00.lnd.ops.eu.uu.net!bnewsinpeer00.bru.ops.eu.uu.net!emea.uu.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEUAAACtra19fX3y8vKA gID///9AQEBawxxrAAABeUlEQVR4nHXSwXKDIBAA0G3a8Vw05JxY9E4MObeK3h1Cz2qt//8J3UWj ppIdBxmfu4sC2CcB070+PQHDuAcyhQPzwLVFuSlfqQK7eOFirfQ2ly7JC8a3Kip1sx6QLOaRB0wo IUg8gFUa2D2BIFVb+OYGhC23cB4aUDbaQt4AgifjCACt9HwgQfrjWZWDwNPjEwHbtBu44kPC5D9Y FknMgFf8aZFawDDGIuoTkAYndYczzd5hjqAYwXzQ/QCraB2401HvHyQhKMb2tbw0M7whuBNoIs4M W/Xh056fQzwLPF/g14FkrcLN4nKp9WLByIMImSwyycLjDDsOF93pVFdC6yofHkEjxDhWumtWsMdH edc7SOf2/QiYQiByUU0gSldKD4LyBLUbK+kCaoI+diNlxgOGmIFWhVDpe5RgqEiPRR6Buwx8PxXE G3CGzeMVmAnctUB5h3Hsthljp34Ne/wjbu4+cIovBVbqfH4vFdOkoI2SzEWUZdMMQ9k/5csXnnRd prMAAAAASUVORK5CYII= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux) Cancel-Lock: sha1:QcRy0gRfVR9oA2XIEKJ87Ep0pNk= Original-Lines: 23 Original-NNTP-Posting-Date: 30 Apr 2007 12:27:34 CEST Original-NNTP-Posting-Host: cdbbf9e2.newsspool4.arcor-online.net Original-X-Trace: DXC= 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:43396 Archived-At: Hi, could somebody point me in the right direction on replacing multiple whitespaces in filenames with underscores using dired? % m \(.*[ ].*\)+\..+ RET ; mark all files with spaces % R [ ] RET _ RET ; replace space with underscore The drawback is that one has to repeat this many times for file names wich have multiple whitespaces. Is there better way of doing this with dired (or dired-x, dired+)? TIA Patrick BTW: I'm using Emacs23 from CVS. -- Snoopy: My life has no purpose. My life has no direction, no aim, no meaning. And yet I'm happy. I can't figure it out! What am I doing right?