#define FILE_ATTRIBUTE_READONLY 0x00000001 #define FILE_ATTRIBUTE_HIDDEN 0x00000002 #define FILE_ATTRIBUTE_SYSTEM 0x00000004 #define FILE_ATTRIBUTE_ARCHIVE 0x00000020 #define FILE_ATTRIBUTE_NORMAL 0x00000080 #define FILE_ATTRIBUTE_TEMPORARY 0x00000100 #define FILE_ATTRIBUTE_OFFLINE 0x00001000 #define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000 declare short SetFileAttributes in Win32API ; string @ lpFileName,; integer dwFileAttributes declare integer GetFileAttributes in Win32API ; string @ lpFileName lcFile = "c:\MyPath\SomeFile.Ext" lnCurAttributes = GetFileAttributes(lcFile) if bitand(lnCurAttributes,FILE_ATTRIBUTE_READONLY) = 0 && Attribute not set llSuccess = ( SetFileAttributes(lcFile, ; FILE_ATTRIBUTE_READONLY+lnCurAttributes) = 1 ) else llSuccess = ( lnCurAttributes # -1 ) && Function fail code endifCetin