How to rename file during copy in command prompt

I want copy a file from a folder to another while changing the file name. How can I do this?

For example: copy 1.txt to C:\new folder with this name: 2.bat.

1 Answer

That's pretty straightforward with the copy command:

copy folder1\1.txt folder2\2.bat

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like