DECLARE INTEGER SetFileAttributes IN Kernel32 ; STRING cFileNameToAlter, ; INTEGER nAttributeMask * * attribute bit values are as follows; this is a partial list. * You can set multiple attributes by adding the numbers together * for the attributes you want set, ie Read-only and hidden * would be 1 + 2 (3 unless you work in base 2, then it's 11) * * You must explicitly set the attributes you want to have enabled. * If you have a file that's currently read-only, but now want it * to be read-only and hidden, you pass 3 for the second parameter, * but if you want it to be hidden but read-write you'd pass a 2, * clearing the 1 bit * * R = Read-only 1 * H = Hidden 2 * S = System 4 * A = Archive 32 * * Other attribute values can be found in the MSDN docs nAttribs = 1 && read-only, to clear, use 0 IF SetFileAttributes(FULLPATH(cFileName), nAttribs) = 1 * it worked ELSE * it failed ENDIF