unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Howto rename a file
@ 2005-12-06  0:02 Xavier Maillard
  0 siblings, 0 replies; only message in thread
From: Xavier Maillard @ 2005-12-06  0:02 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-06  0:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-06  0:02 Howto rename a file Xavier Maillard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).