Is there an easy way to swap the file names of two files in Windows? Perhaps using the move command in the shell?
Preferably without using external software.

Example: I have fileA.txt and fileB.txt. After the operation, fileA.txt is now called fileB.txt, and vice versa.

link|improve this question

feedback

1 Answer

up vote 4 down vote accepted

Simple 3 step process in Windows:

ren a.txt a.tmp
ren b.txt a.txt
ren a.tmp b.txt

You can run this directly or save it to a batch file.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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