Description:-

Moves a file from one location to another on the server.

<cffile
    action = "move"
    destination = "full pathname"
    source = "full pathname"
    attributes = "file attributes list"
    charset = "character set option"
    mode = "mode"
>

cfscript the equivalent of the upper syntax

<cfscript> 
    cffile(
        action = "move",
        destination = "full pathname",
        source = "full pathname",
        attributes = "file attributes list",
        charset = "character set option",
        mode = "mode"
    );
</cfscript>

Attributes:-

action:- This is a required attribute, the type of file manipulation that the tag performs.

destination:- This is a required attribute, the Pathname of a directory or file on the web server where the file is moved.

source:- This is a required attribute and the pathname of the file to move. If it is not an absolute path (starting with a drive letter and a colon, or a forward or backward slash), it is relative to the ColdFusion temporary directory, which is returned by the GetTempDirectory function.

attributes:- This is a non-required attribute, A comma-delimited list of attributes to set on the file that applies to Windows. the values are:-
readOnly
hidden
normal

charset:- This is a non-required attribute, JVM default file character set for the default value, The character encoding in which the file contents are encoded. The following list includes commonly used values:-
utf-8
iso-8859-1
windows-1252
us-ascii
shift_jis
iso-2022-jp
euc-jp
euc-kr
big5
euc-cn
utf-16

mode:- This is a non-required attribute and applies only to UNIX and Linux. Permissions. Octal values of UNIX chmod command. Assigned to owner, group, and other, respectively.
644:- assigns read/write permission to the owner; read permission to group and others.
777:- assigns read/write/execute permission to all.

Example:-

This example moves the testNote.txt file from d:\files\documents\ to the d:\files\documents\textNote\ directory in Windows.

<cffile
    action = "move"
    source = "d:\files\documents\testNote.txt"
    destination = "d:\files\documents\textNote\"
>