all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.