home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Rename(REL2) ARP User's Manual Rename(REL2)
-
-
-
- NAME
- Rename - To rename or move files and directories.
-
- SYNOPSIS
- Rename FILE TO FILE or directory.
-
- DESCRIPTION
- Rename changes the names of your files. If the file already
- exists, or if you attempt to Rename a file from one disk
- device to another, Rename will fail. You may use wildcards
- to move many files from one filename to another, or you may
- use wildcards to move many files from one directory to
- another. Note that using Rename to move files is quicker and
- cleaner than using Copy and then delete.
-
- The wildcards supported for the creation of the destination
- name is the similar to that used by the ARP Copy command.
- There are basically two types:
-
- Rename Filename <opt_prefix>*<opt_postfix>
-
- In this case, when the original filename does not use the
- "*" character, the optional prefix and postfix if supplied
- will be tacked on to the source name. You can supply one or
- both of these optional extensions, but it is possible to
- exceed the length of an AmigaDOS filename, in which case
- your filename will be silently truncated to fit.
-
- The second case is more powerful:
-
- Rename Filename* <opt_prefix>*<opt_postfix>
- or
- Rename *Filename <opt_prefix>*<opt_postfix>
-
- It works like this:
-
- source: Filename *
- action: <replace> <preserve> <add>
- destination: opt_prefix * opt_postfix
-
- and
-
- source: * Filename
- action: <add> <preserve> <replace>
- destination: opt_prefix * opt_postfix
-
- In otherwords, the portion of the filename represented by
- the *, the wildcarded portion, is always copied to the
- destination name, the optional postfix's and prefixes are
- also copied literally. The difference in these two cases is
- only which optional extension replaces the non-wildcarded
- portion of your source filename.
-
-
-
- Page 1 (printed 2/22/88)
-
-
-
-
-
-
- Rename(REL2) ARP User's Manual Rename(REL2)
-
-
-
- EXAMPLES
- Here are some examples to make things clearer, starting with
- the easiest first (these are also the most frequently used
- and useful):
-
- Rename File1 File2
- Rename File1 DIRECTORY
- Rename File* DIRECTORY
-
- In the above three examples, we see a files name being
- changed (File1 becomse File2), we see a file being moved
- into another directory, and we see a lot of files being
- moved into another directory. These are by far the most
- common uses of Rename.
-
- Here are a couple examples of the pattern substitution
- capabilities of ARP's Rename. Given the files AB1 AB2 AB3,
- the following command:
-
- Rename AB* xxx*zzz
-
- fi
- will rename the files to xxx1zzz, xxx2zzz, xxx3zzz respectively.
- Note that the common portion of the pattern "AB" has been
- replaced by the prefix, the stared part of the pattern is copied
- literally, and the postfix is simply added on to the end of that.
- Given the files 1AB 2AB 3AB and the command:
-
- Rename *AB xxx*zzz
-
- would also rename the files to xxx1zzz xxx2zzz, xxx3zzz, but
- in this case the portion replaced is the postfix end.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 2 (printed 2/22/88)
-
-
-
-