I think you misunderstood (at least, I hope I've understood :)
Rewriting rename to include the -i option (or -y option for Windoze) will not clobber an existing file (unless the underlying OS function has the same problem with the -i option, in which case we're all screwed.)
I tried my example out, and it seemed to work as I intended. I'm sure someone has come up with a more robust and useful version. I was just trying to show that it was possible.
-QM
--
Quantum Mechanics: The dreams stuff is made of
| [reply] [d/l] [select] |
| [reply] |
| [reply] [d/l] |
P:\test\data>type hello.dat
Hello world
P:\test\data>type goodbye.dat
Goodbye cruel world
P:\test\data>rename hello.dat goodbye.dat
A duplicate file name exists, or the file
cannot be found.
P:\test\data>type hello.dat
Hello world
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon
| [reply] [d/l] |