Setting File and Directory Attributes
Setting File and Directory Attributes
In Windows, you specify file attributes using the
UNIX, you specify file and directory permissions using the
mode
Windows
In Windows, you can set the following file attributes:
To specify several attributes, use a comma-separated list, such as
attributes="ReadOnly,Archive"
attributes are maintained. If you specify any other attributes with Normal, the
additional attribute overrides the Normal setting.
Example: Setting file attributes
This example sets the archive bit for the uploaded file:
<cffile action="Copy"
Note
Make sure you include the trailing slash (\) when you specify the destination
directory. Otherwise, ColdFusion treats the last element in the pathname as a
filename.
UNIX
In UNIX, you can set permissions on files and directories for owner, group, and
other. Values for the
command:
attribute.
ReadOnly
Temporary
Archive
Hidden
System
Normal
source="c:\files\upload\keymemo.doc"
destination="c:\files\backup\"
attributes="Archive">
mode
4 = read
2 = write
1 = execute
. If you do not use
attribute correspond to octal values for the UNIX
attribute. In
cffile attributes
and
cffile
, the file's existing
attributes
323
cfdirectory
chmod
Need help?
Do you have a question about the COLDFUSION 5-DEVELOPING and is the answer not in the manual?
Questions and answers