FileSetAttribute(FileName,Attribute)

Sets an attribute (hidden, read-only etc.) of a file.

Parameters:

FileName The name of the file that should be changed
Attribute The attribute that should be set. Always in the form "X+" or "X-".

X can be one of the following values:

R = read-only
H = hidden
S = system
A = archive

The add an attribute to a file, use "X+".
To remove an attribute use "X-".

Remarks:

This function accepts only one attribute per call.

Example:

Call FileSetAttribute("C:\MSDOS.SYS","R-") 'remove read-only attribute
Call FileSetAttribute("C:\MSDOS.SYS","H-") 'remove hidden attribute
Call FileSetAttribute("C:\MSDOS.SYS","S-") 'remove system attribute

'do something with file....

Call FileSetAttribute("C:\MSDOS.SYS","R+") 'set read-only attribute
Call FileSetAttribute("C:\MSDOS.SYS","H+") 'set hidden attribute
Call FileSetAttribute("C:\MSDOS.SYS","S+") 'set system attribute