To rename our files and folders we need to use the Ren command. As you can probably guess, ren stands for rename.
Renaming a single file is quite easy.
Simply type the ren command followed by the name of the file you want to rename in quotes, along with the name we want to give it, once again in quotes.
In this case lets rename a fie named Cat into My Cat.
Cat.txt -> My Cat.txt
Remember to include the extension of your file as well, in this case .txt.
Ren “Cat.txt” “My Cat.txt”
If the file you want to rename does not contain any spaces within its name, surrounding its name in quotes is not necessary.
Keep in mind that the above command will only work if the fle you wan to rename is located I your current directory, we are going to learn houw to rename our files from any directory later on.
Optionally, you can use the dir command to verify that your file has been renamed.
Your file should now appear with its new name. Success!