Aidan,
Nameconflict is only used when action=upload.
This is from the the Help files that ship with Studio (CFML Language
reference);
<snip>
CFML Language Reference
----------------------------------------------------------------------------
----
Chapter 1 : ColdFusion Tags
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. "
Copyright � 2000, Allaire Corporation. All rights reserved.
</snip>
Douglas Malcolm
-----Original Message-----
From: Aidan Whitehall [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 4:57 AM
To: CF-Talk
Subject: CFFILE ACTION="copy" and NAMECONFLICT
I'm using CFFILE to copy a file from one directory to another on the server.
What happens if the file already exists? It's telling me that I can't use
the NAMECONFLICT attribute when the ACTION is "copy":
========================================
Attribute set validation error in tag CFFILE
The tag has an invalid attribute combination: the value of the tag switch
attribute 'ACTION' which is now 'COPY' requires a different combination of
attributes. For the same switch attribute value the following unknown
attributes have been provided: (NAMECONFLICT).
========================================
Does it just automatically overwrite the file in the destination folder?
Have I got to use CFTRY and CATCH instead?
Seems nuts not to have this built into the CFFILE tag directly...
--
Aidan Whitehall <[EMAIL PROTECTED]>
Netshopper UK Ltd
Advanced Web Solutions & Services
http://www.netshopperuk.com/
Telephone +44 (01744) 648650
Fax +44 (01744) 648651
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists