Re: [NTISP] Command Line File Copy

Jack Olszewski ( jacek@hermes.net.au )
Thu, 04 Feb 1999 14:55:06 +1100

At 09:25 PM 3-02-99 -0500, you wrote:
>I am looking for a way to copy a file from one directory to another using
>the command line. The catch is, when it does the copy, there will already
>be files in the destination directory with the same name. Is there a way
>to give the files the same name with perhaps the ext containing some
>incremented number.
> ...

Set an additional environment variable, say E, to 0, and use something
like the following bat file:

rem mymove
move %1 %1.%E%
set /A E=%E%+1

'mymove abc' used once moves abc into abc.0. Second time - into abc.1, etc.

Jack Olszewski
Hermes Internet
http://www.hermes.net.au/

For more information about this list, including removal,
see this url: http://www.iea-software.com/maillist.html