Renaming Files - the REN Command

Sometimes you may find that a name that you had given to a file initially is no longer suitable. If you wish to change the name, you need not copy it again under a different name. DOS allows the user to change the name of a file. This can be done by using the REN command. If you have a file named ZZZ.PIT and you now wish to rename it to LOAN.SUM, the command would be


The file ZZZ.PIT will now exist under the name LOAN.SUM. Though the name has been changed, the contents of the file remain the same. A path can also be defined with the REN command. Let us assume that you wish to change the name of the file CALM that exists in the directory WEATHER on the C drive. The new name to be given is STORM. The command you could give