Hugues
(Fresh Scripter)
2005-05-05 03:46 PM
Folder attributes

Is it possible to change folder attributes ?
I know it possible for the files but for the folder ?? and how ?

Thank's


Mart
(KiX Supporter)
2005-05-05 06:27 PM
Re: Folder attributes

Quote from the manual:

Quote:


SETFILEATTR
Action
Sets the attributes of a file.

Syntax
SETFILEATTR ("file name", attributes)

Parameter
File name
Identifies the file of which you want to set the attributes.
Attributes
Attributes to set for the file. The attributes can be one or more of the following values:
1 Read only. The file or directory is read-only. Applications can read the file but cannot write to it or delete it. In the case of a directory, applications cannot delete it.
2 Hidden. The file or directory is hidden. It is not included in an ordinary directory listing.
[cut].....[/cut]






so this would make the testfolder folder on c: hidden.

Code:

$Result = SetFileAttr("c:\testfolder", 2)