rename file newname
file
A template specifying the file or files to be renamed.
newname
If a single file is being renamed, the new filename, else the new name of
the field being renamed in a set of filenames.
field = root
Specifies either the "root" or the "extn" field as the
one to be modified.
Rename renames either a single file to "newname", or a set of files, changing either the root or the extension part of each name.
1. Rename file "fred" to "jay".
cl> rename fred jay
2. Change the root name of a set of files from "out" to "pkout".
cl> rename out.x,out.o,out.par pkout
3. Change the extension of all ".f77" files from ".f77" to ".f".
cl> rename *.f77 f field=extn
Rename cannot be used to move a file to another directory unless the full destination filename is specified. Use movefiles if do not want to type the filename twice.