help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Easy way to rename files sequentially?


From: Thierry Volpiatto
Subject: Re: Easy way to rename files sequentially?
Date: Mon, 26 Nov 2007 21:08:52 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.60 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]