RENAME
[/?]
[/A[+|-]drash]
[/S[+|-]drash]
[/NEW]
[/OLDSRCDIR[+|-]]
[/OLDDESTDIR[+|-]]
[/E/N/Q/U[+|-]]
Filespecs…
Filespec
/?/A/S/E/N/U/Q/NEW/OLDSRCDIR/OLDDESTDIRThe RENAME command first processes the contents of the CMD_RENAME_INIT environment variable, if it has inherited one, as if it were a command tail, before processing any of the command tails that have been passed to it. This allows one to modify default options globally. (One can use command aliases or wrapper scripts to achieve the same effect.)
The RENAME command renames all files that match the first to the penultimate filespecs, which are search wildcard specifications, to new names determined by the final filespec, the target filespec, which is a substitution wildcard specification,.
Each source file is renamed to the directory given in the target filespec (or a subdirectory thereof if the /S option is used). For this to succeed, the source and target directories must reside on the same volume.
Note: This is different to the 16-bit CMD supplied with IBM OS/2, which preserves the original directory of each source file when renaming it if the target substitution wildcard specification does not contain a directory or a drive letter.
Note: This is different to the 16-bit CMD supplied with IBM OS/2. The RENAME command built in to the 16-bit CMD supplied with IBM OS/2 renames subdirectories only if the wildcard specification happens to be the name of an existing directory (not simply if it happens to match that name). This means that the behaviour is dependent from what files and directories happen to exist at the time that the command is run. Without context, one cannot say exactly what the RENAME command will do.
COPYPLUS COPYSTD MORE MOVE DEL DESCRIBE TRUENAME TYPE