请问怎样获得文件夹(Directory)的属性?

解决方案 »

  1.   

    GetFileAttributes Attr := GetFileAttributes('c:\test.txt'); 
      if (Attr and FILE_ATTRIBUTE_COMPRESSED) <> 0 then 
        ShowMessage('Compressed') 
      else 
        ShowMessage('Not compressed'); 可以取文件,或目录
      

  2.   

    GetFileAttributes,
    上面是取路径了
      

  3.   

    如果只是获取属性,用FileGetAttr函数也可以。
    如果是获取大小,占用空间,包含文件数目,创建时间那样的文件夹属性信息,就用其它的API函数了