Chapter 1: ColdFusion Tags
Example
The following example renames the file
<CFFILE ACTION="Rename"
SOURCE="c:\files\memo\keymemo.doc"
DESTINATION="c:\files\memo\oldmemo.doc">
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
directory:
<CFFILE ACTION="Copy"
SOURCE="c:\files\upload\keymemo.doc"
DESTINATION="c:\files\backup\">
to
keymemo.doc
oldmemo.doc
file in the
keymemo.doc
53
:
c:\files\backup\
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?
Questions and answers