# CFFILE ACTION="Copy"

The CFFILE tag can be used to copy a file from one directory to another on the server.

### Syntax

    <CFFILE ACTION="Copy"
        SOURCE="full_path_name"
        DESTINATION="full_path_name"
        ATTRIBUTES="file_attributes">

#### SOURCE

Required. The full path name of the file to copy.

#### DESTINATION

Required. The full path name of the directory where the copy of the file will be saved. If you do not specify a file name, you must include the trailing slash. On Windows, use the backward slash (\). On UNIX, use the forward slash (/).

#### ATTRIBUTES

Optional. A comma-delimited list of file attributes to be set on the file being copied. The following file attributes are supported:

- ReadOnly
- Temporary
- Archive
- Hidden
- System
- Normal

If ATTRIBUTES is not used, the file's attributes are maintained. If Normal is specified as well as any other attributes, Normal is overridden by whatever other attribute is specified.

Individual attributes must be specified explicitly. For example, if you specify just the ReadOnly attribute, all other existing attributes are overwritten.

### Example

The following example saves a copy of the `keymemo.doc` file in the `c:\files\backup\` directory:

    <CFFILE ACTION="Copy"
        SOURCE="c:\files\upload\keymemo.doc"
        DESTINATION="c:\files\backup\">

Note | On Windows, you must include the backward slash (\) after the destination directory name if you do not specify a file name. In this example, the specified destination directory is "backup. "