.. highlightlang:: us .. index:: GetFileAttributes .. _getfileattributes: GetFileAttributes ================= .. us.tag GetFileAttributes ENGLISH FILE_MISC :ref:`GetFileAttributes` returns attributes for one or more a specified files or directories. .. function:: nAttributes = GetFileAttributes(svFileNames) .. us.return **Return Value** If the function succeeds, the return value contains the attributes of the specified file or directory. If *svFileNames* is a vector of file names, the function returns a vector of attributes. If the file does not exist or if the function fails, the return value is -1. The attributes can be one or more of the following values: .. list-table:: :header-rows: 1 * - Value - Meaning * - FILE_READONLY (1) - The file or directory is read-only. * - FILE_HIDDEN (2) - The file or directory is hidden. * - FILE_SYSTEM (4) - The file or directory is used by the operating system. * - FILE_DIRECTORY (16) - ssFileName is a directory. * - FILE_ARCHIVE (32) - The file or directory is an archive file or directory. * - FILE_NORMAL (128) - The file or directory has no other set attributes. .. us.params **Parameters** .. uparam:: svFileName *svFileName* specifies the name of one or more files or directories. .. seealso:: :ref:`overview-files`, :ref:`FindFiles`, :ref:`SetFileAttributes`, :ref:`GetFileWriteAccess`, :ref:`GetDirectoryWriteAccess` :sub:`id-242750`