SetFileAttributes

Description:

baSetFileAttributes sets the attributes of a file.

Platforms:

Windows and Macintosh

Usage:

Result = baSetFileAttributes( FileName , Attributes )

Arguments:

String, string.
FileName is the file to get the attributes of.
Attributes are the attributes to set. Can be on of:

Windows

"r"

read-only

"a"

archive

"h"

hidden

"s"

system

Macintosh

"r"

locked

"h"

invisible

"s"

shared

"c"

custom icon

"t"

stationery pad

"l"

alias

"n"

name locked

"b"

has bundle

"i"

has been inited

An empty string removes all attributes.

Returns:

Integer.
Returns 1 if successful, else 0.

Examples:

Director:
OK = baSetFileAttributes( "c:\data\student.dat" , "rh" ) -- make file hidden and read-only

Authorware:
OK := baSetFileAttributes( "c:\\data\\student.dat" , "" ) -- clear all attributes
 

See also:

baFileAttributes