Usage

ccp [ -flags ] [ -- ] source ... [ ! Xsource ... ] targetdir


The ccp command conditionally copies files whose names match the source file specification(s). It ignores hidden and system files. It copies files to the target directory. The target directory must already exist.

If there is only one source file specification and no Xsource file specifications, then the targetdir is optional. In this case, it defaults to . (a dot, which means the current directory).

A source file specification consists of an optional drive, an optional path, and a filename. The filename may contain pattern-matching characters. If a source file specification is the name of a directory, then ccp appends ``/*'' to it, matching all files in the directory.

If a ! is specified, then ccp will exclude (not copy) any source file whose source name matches one of the Xsource patterns (listed between the ! and the target directory). Each Xsource pattern must match the full source name to exclude the source file. An Xsource pattern may, of course, contain drive and path information.

Generally, an Xsource pattern should start with a ``*'' character or with the drive and path of a source file (as specified on the command line) or it will not exclude any source files. This is because ccp compares each Xsource pattern with the path and name of each source file as it was specified on the command line, and including any subdirectory names that ccp added due to the -s flag. See the examples for more details.

Both \ (backslash) and / (forward slash) characters are interpreted as path separators in source file specifications, the Xsource (exclude source) patterns, and the target directory specifications. Therefore, the \ (backslash) character cannot be used as an escape character in an Xsource pattern.

This program writes the names of source files (both those copied and, if the -x flag is specified, those excluded) to standard output. It writes all other messages, errors, and copy count statistics to standard error.