ColdFusion 9.0 Resources |
cffile action = "rename"Syntax<cffile action = "rename" destination = "pathname" source = "full pathname" attributes = "file attributes list" mode = "mode"> Note: You can specify
this tag’s attributes in an attributeCollection attribute
whose value is a structure. Specify the structure name in the attributeCollection attribute
and use the tag’s attribute names as structure keys.
Attributes
UsageThe rename action renames or move a file. The destination attribute must be a pathname, not just a new name for the file. If the destination is a directory, the file is moved and not renamed. ExampleWindows example: <!--- Source Document is read-only but when renamed it becomes normal (not hidden or read-only). ---> <cffile action = "rename" source = "c:\files\memo\readonlymemo.doc" destination = "c:\files\memo\normalmemo.doc" attributes="normal"> UNIX example: <cffile action = "rename" source = "#myWR#/memo/sample.txt" destination = "#myWR#/memo/other_sample.txt" mode="666"> |