From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: Easy way to rename files sequentially? Date: Mon, 26 Nov 2007 21:08:52 +0100 Message-ID: <87lk8ku5uz.fsf@thievol.homelinux.org> References: <87ejeexgfy.fsf@celephais.home.net> <871waeroap.fsf@newsguy.com> <8763zpwje7.fsf@newsguy.com> <87y7cl6uka.fsf@localhorst.mine.nu> <87ve7ox53v.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 1196107688 20861 80.91.229.12 (26 Nov 2007 20:08:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Nov 2007 20:08:08 +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 21:08:15 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 1IwkFF-0001nT-I7 for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Nov 2007 21:07:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwkF0-0006Aj-D0 for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Nov 2007 15:07:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IwkEm-00069y-1S for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 15:07:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IwkEk-00069A-2b for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 15:07:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwkEj-000697-SI for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 15:07:21 -0500 Original-Received: from nf-out-0910.google.com ([64.233.182.188]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IwkEi-0003aJ-Tf for help-gnu-emacs@gnu.org; Mon, 26 Nov 2007 15:07:21 -0500 Original-Received: by nf-out-0910.google.com with SMTP id f5so815699nfh for ; Mon, 26 Nov 2007 12:07:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:to:subject:references:face:date:in-reply-to:message-id:user-agent:mime-version:content-type:from; bh=Jf4wyx0sUpRxt11606D28IvUUTEW09ooQtgGUjfndwM=; b=H6FgfrXJKDO43GuJCOoCsYbhnohpeB3QZ49NV9CbEdhSHUOodS1t2jjPdVEayseJLgb5AcCv3I15CmZjstTIp+Ukl3c8CkBxbqk/8CT11S+lPShTaTfoNlo+eQh4n/ucRlAh1QeogkK1efOEf6aDYu5BIvlodLoWYrCjS0XvWKc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:to:subject:references:face:date:in-reply-to:message-id:user-agent:mime-version:content-type:from; b=xTq888xCI1hohxP38TOyvrvM5syDbu2YMrLKsveM4tp4E5I7lOEt+qsHTYh52h+wyCAlW9pWXKyYLjmDNDgOYH35TC0KOG5JsHvI6iwOpLjMmblx0fLyXwPr2Agh1ZjXJX0py6RHFmy6wBYOdj3J4OB+ge2SJTHs5m7kENjIcZ4= Original-Received: by 10.86.54.3 with SMTP id c3mr834662fga.1196107639043; Mon, 26 Nov 2007 12:07:19 -0800 (PST) Original-Received: from thievol.homelinux.org ( [78.114.32.12]) by mx.google.com with ESMTPS id b30sm2276583ika.2007.11.26.12.07.17 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Nov 2007 12:07:18 -0800 (PST) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEUAAAD/eiojJC8HDgL9 q6CxcyAADQCPoKCbKDEHHjqGqpmkAAACZklEQVQ4jWVTwW7TQBAdZSSL61Jb8jFyVSXcth5inKPF RvSImwTtMSKSPwCoLG44xtKeyal/y9sN1G47x3meN7PvPdNZEzVNQzwTYhGtz8I6EnSJtUQHotni nWYSNA5ciFARkIK0Xvx8LBpmKRppDgyaI+YifLduf54bmpPkgQj0fp6Z1237XTTLyphtoanR4ktr Wv9p27kw7+xQ/WpI+LcxqcYOzhbtJ4x0tjNb0KxMUsdXOc7K2odsHvHK1upOSGLrXFdhZIZR84W4 BJBoKpVDxR9FBvSrnjnfd0ppulW+YuN2CYDNFu8fag90vm8HZSq1aX/sLS50ygO+n4qAVrk26+pU S+c7AehzKfvBnrLM2fi+BNNbodtKpXgudtus/VamXeU/3TKVddpDbxCc1o/nslr6fjKn4AEkI1Gn PJOhwjal7kPrUhKn17LcVbIKq8di3LWssU+cu6Zp3cQVtOg11GYINOEaIE3v/WQ9HeAPldr30TEk Y1rvoYnNF3O+ZOZpiCFm0gPwZh9IRrayUm5nHj4TFxgRfgJm0HQ/mHsfDSyZ7C9NEENk6YTlcbzq pg6WbSHezsp6BIYLcHej3D7ejKKsrPeyU8kN+ICPK4KVXZdmYTIdFYHzKlVpfwgpSMYdy770KdgW pUf6iVgS2DbIl0JWJoAuA3ttKifRREjNF6BLeqHjFIi+eiCxIs/8gKpHHx343fAzLGqOiA5iLi+c wj+ZIwcswZBJ+Zin7jqwPANY8h1+h+00U6HPOsdV5opelrDXwvTRK2C2dC/S+e/cN9bV6vQawA+R 1Fa/7vtXIAb/c/MXBLaluuFkJS8AAAAASUVORK5CYII= In-Reply-To: <87ve7ox53v.fsf@newsguy.com> (reader@newsguy.com's message of "Mon\, 26 Nov 2007 11\:56\:52 -0600") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:49556 Archived-At: Hi, i use a script python to serial rename, called serialrename.py.(i can attach it next post if interested) i try to use it with this defun, renaming a dir ~/test_wdired with some file like toto.txt etc... to file 01.txt etc.. (defun rename-all-with-number () (interactive) (wdired-change-to-wdired-mode) (shell-command "~/bin/serialrename.py -d ~/test_wdired/ -e txt")) Thats work fine but i don't know how to put ~/test_wdired/ in option; I would like to do some thing like that: (defun rename-all-with-number (dir) (interactive "sDir: ") (wdired-change-to-wdired-mode) (shell-command "~/bin/serialrename.py -d dir -e txt")) In python i can do some thing like: ".....%s" % ~/test_wdired but in lisp i don't know how. the best would be to write all in lisp but it's too hard for me now. -- A + Thierry