CFFILE ACTION="Move"

The CFFILE MOVE action can be used to move a file from one location on the server to another.

Syntax

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

SOURCE

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

DESTINATION

Required. The full path name of the directory to which the file will be moved. If you do not specify the file name, a trailing slash must be included in the target when moving a file. Use the backward slash (\) on Windows; use the forward slash (/) on UNIX.

ATTRIBUTES

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

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 moves the keymemo.doc file from the c:\files\upload\ directory to the c:\files\memo\ directory on Windows:

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

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 "memo. "