RENAME - change the AFT name of a file.

Syntax:

rename oldname newname

Examples:

rename h* .h
rename .h h*

Description:

The simplest use of RENAME is to give a new name to a file that is already in the AFT.

If only one of the two specified file names exist, RENAME changes the one name to the other one specified. If both exist, RENAME exchanges the two names.

Bad Names in the AFT:

Occasionally, a program with an error creates a file with a bad AFT name, i.e. one that has an uppercase letter, a blank, or some other control character. Since almost no commands accept such name, the only way to get rid of it would be a command like REMOVE CLEARFILES and which has the side effect of clearing everything else from the AFT. RENAME lets you correct such a name so that the file can be processed with other commands (e.g. REMOVE).

Normally, RENAME maps the characters of both "oldname" and "newname" into lowercase before performing its operation. However, if either name is given in quotes (single or double), RENAME preserves the case of letters.

If the invalid character is a quote character, type two of the characters or enclose the string in the other kind of quote. For example,

'a"b'
"a""b"

both refer to the AFT name a"b.

Names in quotes may also contain escape sequences to represent special characters. Escape sequences follow the conventions of the C programming language. Thus an escape sequence consists of a backslash (\) followed by one to three other characters. RENAME recognizes the following escape sequences:

\a     beep (octal 007)
\b     backspace
\f     ASCII formfeed
\n     new-line
\r     carriage return (no line feed)
\t     horizontal tab
\v     vertical tab
\\     \ (backslash)
\nnn   nnn is 1-3 character octal number

The escape sequence "\nnn" stands for the ASCII character whose octal representation is "nnn". For example, "\101" is uppercase 'A'.

Examples:

rename 'UPPER' lower
rename "\n" newline

Copyright © 1996, Thinkage Ltd.