Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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 Feb 3 '12 at 19:58
-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 Feb 3 '12 at 20:13

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.

share|improve this answer
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 Feb 4 '12 at 0:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.