![]() ![]() ![]() |
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 below 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. This makes CFFILE a very powerful tool.
CFFILE can be used to move a file from one location on the server to another.
The following example moves the file "KeyMemo.doc" file from the c:\files\upload\
directory to the c:\files\memo\
directory:
<CFFILE ACTION="MOVE" SOURCE="c:\files\upload\KeyMemo.doc" DESTINATION="c:\files\memo\">
CFFILE can be used to rename a file on a server.
The following example renames the file KeyMemo.doc
to OldMemo.doc
:
<CFFILE ACTION="Rename" SOURCE="c:\files\memo\KeyMemo.doc" DESTINATION="c:\files\memo\OldMemo.doc">
CFFILE can be used to copy a file from one directory to another on the server.
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\">
CFFILE can be used to delete a file on the server.
The following example permanently deletes the specified file:
<CFFILE ACTION="Delete" FILE="c:\files\upload\"oldfile.txt">
![]() ![]() ![]() |
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.