> >nAttribute=1 >declare integer SetFileAttributes IN kernel32 STRING, INTEGER >x1=SetFileAttributes(thisform.lcFilename,nAttribute) >>it returns 1 in x1
Function GetAttr Parameter zFileName && This is a complete filespec. Private zADIR, zReturn, zAReturn, zAttribute, zForNext, zAt zAReturn = Adir(zADIR, zFileName,'rhsa') zReturn = '' If zAReturn = 1 && check for bad filename zAttribute = zADIR[5] && get our attributes For zForNext = 1 To 5 && Loop through attribs zAt = Substr(zAttribute,zForNext,1) && pull out 1 char If zAt != '.' && skip 'blanks' zReturn = (zReturn + zAt) && set the return up Endif Endfor Else zReturn = '?' && Indicate a bad filename Endif Return (zReturn)