I would like to rename a file that is uploaded to another server from extension .txt to .txt_mvd and move to a different directory for archiving in a Windows batch mode. Can anyone help with what the script commands should be like?

Thanks, Allen

  • As somebody pointed out in an answer they've now deleted, there is also the MOVE command. It's not clear to me from the question whether you want copy or move. It did look like he might've wanted Move, but the fellow that posted the Move answer has deleted his answer. Nevertheless, it's similar to Copy in syntax, it's not rocket science
    – barlop
    Commented Feb 3, 2012 at 19:58
  • 1
    -1 because people don't know whether you mean copy or move.. and because you don't even know how to ask a question properly. and you're asking about scripts when it looks like you don't even know the copy or move command and in which case should find that out, which isn't hard
    – barlop
    Commented Feb 3, 2012 at 20:13

1 Answer 1


Use COPY Command, to copy the file from source to destination location.


COPY source destination


copy test.txt "D:\destination\test.txt_mvd"

While doing this process, renaming of a file is done automatically at destination location.

That is the Trick in this command.

  • I need to rename only new files that come in to the current directory and then move it to the archive directory after renaming with new extension. Thanks for your reply.
    – Allen
    Commented Feb 4, 2012 at 0:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .