Meet the command prompt - the REN command

The RENAME command can be used instead of this command - they do the same thing. What they do (as the names suggest) is to rename a file. It takes two arguments; the file to be renamed and the new name to be given to the file. It takes the form
ren file1 file2.

Here, file1 is the path to the file to be renamed. file2 is the new name to be given to the file.

After this command is executed successfully, there file specified by file1 no longer exists. If the file existed before, its name will be changed to file2.

Note however that, the file name includes the extension.

Assuming i have my curriculum vitae typed with MS Word, and saved with the name cv.docx, if i want to change the name, i will simply have to type

ren cv.docx curVit.docx. 

This will change the name and keep the extension, still allowing it to be opened with the default program.

running ren cv curVit will not work since the command cannot find a file named cv.

Be careful with extensions, since changing them may give you a tough time to use your file.

Popular posts from this blog

Manual internet settings for Glo Ghana

Automatic internet settings for mtn and airtel Ghana

make a folder that cannot be deleted