[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Howto rename a file
From: |
Xavier Maillard |
Subject: |
Howto rename a file |
Date: |
Tue, 06 Dec 2005 01:02:51 +0100 |
User-agent: |
RMAIL/GNU Emacs 22.0.50.1 |
Hello,
Given the situation I have files in a directory such as foo-1, foo-2
...
When I use an Emacs batch session, I want these files to be renamed
as bar-1, bar-2 and so on.
In certain cases, I may have other files named foo-1 that should be
renamed, following this logic, as bar-1. What I want is that if a
file bar-1 already exists, then the file should be renamed as
bar-<n> where <n> is a unique number following the maximum found
in the directory.
So foo-1 will be renamed as bar-3 in my example.
How would you do that ?
Thank you
Xavier
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Howto rename a file,
Xavier Maillard <=