SpartaDOS X Reference Manual |
The Command Processor — Commands |
RENAME Command |
Purpose |
This command allows you to change the name of one or more files. |
|
Syntax | RENAME [d:][path]fname[.ext] fname[.ext] |
|
Alias | REN |
|
Type | Internal |
|
Related | MENU |
|
Remarks |
Wildcards may be used in both filespecs. A device and path may only be specified on the first filename (the old name filespec). Filenames must be specified for both source and destination names, otherwise an error will occur. The rules for wildcarding are the same as for the
COPY command. Here are a few examples:
RENAME *.BAK *.DOC The above command changes all the extensions to "DOC" of files that previously had extensions of "BAK". RENAME AC*.* *.XX This command changes the extension of all files beginning with "AC" to "XX". NOTE: Rename your files with caution. There is no check for existing filenames. Careless renaming may result in more than one file with the same name. The only way to separate these files is with a sector editor like DiskRx (from SpartaDOS Tool Kit) or through tedious use of the ERASE and UNERASE commands. To use this second method, ERASE the duplicate files, then UNERASE them. Answer 'Y' to only one of them and 'N' to the rest. Rename this file to something different and repeat the this UNERASE, RENAME cycle until all of the files are restored. |
Previous page |