Setting File and Directory Attributes  
 
 

File attributes in Windows are defined using the CFFILE ATTRIBUTES attribute. In UNIX, file and directory permissions are defined using the CFFILE and CFDIRECTORY MODE attribute.

 
 
  UNIX  
 
 

In UNIX, you can set permissions on files and directories for owner, group, and other. Values for the MODE attribute correspond to octal values for the UNIX chmod command:

  • 4 = Read only
  • 2 = Read/write
  • 1 = Read/write/execute

You enter permissions values in the MODE attribute for each type of user: owner, group, other in that order. For example to assign read permissions for all:

MODE=444

To give a file or directory owner read/write/execute permissions and read only permissions for everyone else:

MODE=744
 
 
  Windows  
 
 

In Windows, you can set the following file attributes:

  • ReadOnly
  • Temporary
  • Archive
  • Hidden
  • System
  • Normal

If ATTRIBUTES is not used, the file's existing attributes are maintained. If Normal is specified as well as any other attributes, Normal is overridden by whatever other attribute is specified.

 
 
  Example: Setting file attribute  
 

This example sets the archive bit for the uploaded file:

<CFFILE ACTION="Copy"
    SOURCE="c:\files\upload\keymemo.doc"
    DESTINATION="c:\files\backup\"
    ATTRIBUTES="Archive">


 
 
BackUp LevelNext
 
 

allaire     AllaireDoc@allaire.com
    Copyright © 1998, Allaire Corporation. All rights reserved.