If you want to rename a File and Folder from the Command Prompt, refer to the instructions below.
Renaming a file or a folder means changing the name of the file without changing its extension. When our file extension is hidden, and we rename a file, only the name is changed but the .extension remains the same.
But if the file extension is not hidden then we must carefully rename it so that the extension is not changed. Renaming is quite an easy process. Just select the folder-> right click and go to Rename->Now the name is selected-> Delete it and put your new name-> Click outside anywhere to save it. In this tutorial you’ll learn what happens actually that is how to rename the file from command prompt.
1. Step Press Windows + R to open Run Window-> Type cmd to open the Command Prompt.
2. Step Make sure that the file extension is not hidden. So go to View-> mark File name Extensions.
3. Step Now first write down the location path of the file which you want to rename. Open the folder where your file is located-> Click on the address bar. You’ll get something like this E:\folder\subfolder. Here the file I am renaming is stored in E:\
4. Step In the Command Prompt type the following command
- REN “Location\Old name.file extention” “new name.file extension”.
- Example: REN “E:\topics.txt” “debaleena.txt”
- Press Enter and close the Command prompt.
5. Step Now go to the folder and see that the file name is changed.