User Guide

cfdirectory 103
Attributes
Attribute Req/Opt Default Description
action Optional List list: returns a query record set of the files in the
specified directory. The directory entries "." (dot) and
".." (dot dot), which represent the current directory and
the parent directory, are not returned.
create
delete
rename
directory Required Absolute pathname of directory against which to
perform action.
You can use an IP address, as in the following example:
<cfdirectory directory="//12.3.123.123/c_drive/"
name="dirQuery" action="LIST">
name Required if
action =
"list"
Name for output record set.
filter Optional if
action =
"list"
File extension filter applied to returned names; for
example, *.cfm. One filter can be applied.
mode Optional Used with
action = "create". Permissions. Applies
only to UNIX and Linux. Octal values of chmod
command. Assigned to owner, group, and other,
respectively. For example:
644: assigns read/write permission to owner; read
permission to group and other.
777: assigns read/write/execute permission to all.
sort Optional; used
if
action =
"list"
ASC Query column(s) by which to sort directory listing.
Delimited list of columns from query output.
To qualify a column, use:
asc: ascending (a to z) sort order.
desc: descending (z to a) sort order.
For example:
sort = "directory ASC, size DESC, datelastmodified"
newDirectory Required if
action =
"rename"
New name for directory.
recurse Optional no Whether ColdFusion performs the action on
subdirectories:
yes
no
Valid for
action="list" and action="delete".