.. highlightlang:: us .. _setfileattributes: SetFileAttributes ================= .. index:: SetFileAttributes .. us.tag SetFileAttributes ENGLISH :ref:`SetFileAttributes` sets file attributes. .. function:: bool = SetFileAttributes(ssFileName, nAttributes) .. us.return **Return Value** If the function succeeds, the return value *bool* is TRUE (1); otherwise it is FALSE (0). .. us.params **Parameters** .. uparam:: ssFileName *ssFileName* specifies the name of a file. .. uparam:: nAttributes Specifies the file attributes to set for the file. This parameter can be a combination of the values below. However, all other values override ``FILE_NORMAL``. The attributes can be one or more of the following values: .. list-table:: :header-rows: 1 * - Value - Meaning * - FILE_READONLY - The file or directory is read-only. * - FILE_HIDDEN - The file or directory is hidden. * - FILE_SYSTEM - The file or directory is used by the operating system. * - FILE_DIRECTORY - ssFileName is a directory. * - FILE_ARCHIVE - The file or directory is an archive file or directory. * - FILE_NORMAL - The file or directory has no other set attributes. .. us.example **Example** :: SetFilesAttributes("d:/test.asc", FILE_READONLY | FILE_ARCHIVE); .. seealso:: :ref:`FindFiles`, :ref:`GetFileAttributes` :sub:`id-262206`