Renaming a file using CMD – here’s how

by Pramith

You can rename files using the Command Prompt (CMD) in Windows. In this article, we’ll show you step by step which command to use.

Windows: Renaming files using CMD

You can launch the Command Prompt in Windows using the key combination [Windows] + [R] and the command “cmd”. You can then rename individual files via the console.

  • To do this, use the following command with the quotation marks: ren ‘C:\Path\File.txt’ ‘New.txt’
  • An example: In the path ‘C:\New Folder\’, there is a file called ‘Test.txt’ which you want to rename to ‘Chip.txt’. In this case, the command is as follows: ren ‘C:\New Folder\Test.txt’ ‘Chip.txt’
  • You should adapt the individual file and folder names to your own data. The only important thing is that you start the command with ‘ren’ and enclose the individual elements in quotation marks.
  • By the way: the command also works with directories. You can rename a folder using the following code: ren ‘C:\Old Folder Name’ ‘New Folder Name’

Related Articles

Leave a Comment