Lparameters cFileName, cSetReadStatus If not file(cFileName) =dialog("Warning","No Matching File Name Found for "+alltrim(cFileName)+".","File Not Found") Return Endif Declare SHORT SetFileAttributes IN KERNEL32 ; STRING @ lpFileName, ; INTEGER dwAttributes Declare INTEGER GetFileAttributes IN WIN32API STRING @ lpFileName #Define FILE_ATTRIBUTE_READONLY 1 lcFileName=fullpath(cFileName) Do case Case upper(cSetReadStatus)=="READ/WRITE" nSuccess=SetFileAttributes(lcFileName, 0) && Remove all attributes Otherwise nSuccess=SetFileAttributes(lcFileName, BITOR(GetFileAttributes(lcFileName),FILE_ATTRIBUTE_READONLY)) && Make read-only Endcase RETURNThe weird thing is that nSuccess is returning .t., but the read-only flag is not checked. Any assistance or tips would be appreciated. I am assuming it may be a windows vs. Linux issue, but there must be some command that will work.