![]() ![]() ![]() |
||
|
With cffile
, you can create application pages to manage files on your web server. You can use the tag to move files from one directory to another, rename files, copy a file, or delete a file.
The examples in the following table show static values for many of the attributes. However, the value of all or part of any attribute in a cffile
tag can be a dynamic parameter.
Action |
Example code |
---|---|
Move a file |
< |
Rename a file |
< |
Copy a file |
< |
Delete a file |
< |
This example sets the ReadOnly flag bit for the uploaded file:
<cffile action="Copy" source="c:\files\upload\keymemo.doc" destination="c:\files\backup\" attributes="ReadOnly">
Note: Ensure you include the trailing slash (\) when you specify the destination directory. Otherwise, ColdFusion treats the last element in the pathname as a filename. This only applies to copy actions.
|
||
![]() ![]() ![]() |