In windows console (cmd/command) you can write rename a b or move a b. Whats the difference between the two?


There's two main differences:

  1. rename cannot move files to another directory or drive, move can.

  2. rename cannot overwrite existing files, move can (using the /y parameter).

For more information, see the documentation for rename and move.


Assuming the traditional cmd.exe shell:

rename cannot move files to a different directory.

move *.txt E:\Notes

But it can rename multiple files at once. For example:

rename very-long-name.c *.cpp

rename *.txt *.lol

rename proj1.* "Project 1.*"

(This works because the MS-DOS command.com and Windows cmd.exe shells, unlike their Unix counterparts, do not expand wildcards automatically – this is left for the program itself.)


There are two good answers already, but I'm compelled to mention a difference that hasn't been mentioned yet, and that's the syntax itself. If you want to move a file and you use rename, you'll have to put the same name in twice.

move MyFile.txt MyFolder


rename MyFile.txt MyFolder\MyFile.txt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy