hotgeek
hotgeek

Reputation: 75

Move and rename files with the single command

I am looking for single command in CMD which will allow me to rename and move files from one directory to the other directory. Here is my task: Rename all .txt files in the TEST folder with the new extension .doc and then move them to the TEST2 folder. Thanks in advance.

Upvotes: 7

Views: 30839

Answers (2)

manish gupta
manish gupta

Reputation: 199

Though its an older thread, posting this answer in case someone comes looking...

move "c:\test\originalfile.txt" "c:\NewLocation\UpdatedFile.txt"

Upvotes: 16

foxidrive
foxidrive

Reputation: 41224

ren "c:\test\*.txt" "*.doc" & move "c:\test\*.doc" "c:\test2\"

Upvotes: 4

Related Questions