Windows文件一般有名称,修改日期,类型,标题,作者,大小好几十个属性,那要如何取得? 
有哪位知道的 
我主要是想知道作者

解决方案 »

  1.   

    第一时间想到了fileinfo 具体的去查MSDN吧
      

  2.   

    fileinfo只能取到时间,修改者取不到
      

  3.   

    Win32 
    SystemInfo
    好像是这个函数
      

  4.   

    我只知道调用照片的相机信息用EXIF
      

  5.   

    using System.Net;using System.Windows.Forms;           private void GetNetFileInfo(string url)
             {
                 System.Net.HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
                 request.Method = "HEAD";
                 HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                 Console.WriteLine("修改日期:" + response.LastModified.ToString());
                 Console.WriteLine("文件大小:" + response.ContentLength + "字节");
                 response.Close();         }
             private void GetLocalFileInfo(string path)
             {
                 System.IO.FileInfo fi = new System.IO.FileInfo(path);
                 Console.WriteLine("Attributes:" + fi.Attributes.ToString());
                 Console.WriteLine("CreationTime:" + fi.CreationTime.ToString());
                 Console.WriteLine("LastAccessTime:" + fi.LastAccessTime.ToString());
                 Console.WriteLine("LastWriteTime:" + fi.LastWriteTime.ToString());
                 Console.WriteLine("Length:" + fi.Length.ToString());
             }
      

  6.   

    只能取到
                 strMessage += "Attributes:" + fi.Attributes.ToString(); 
    ...
                strMessage += "CreationTime:" + fi.CreationTime.ToString(); 
                strMessage += "CreationTimeUtc:" + fi.CreationTimeUtc.ToString(); 
    ...
                strMessage += "Directory:" + fi.Directory.ToString(); 
                strMessage += "DirectoryName:" + fi.DirectoryName.ToString(); 
                strMessage += "Exists:" + fi.Exists.ToString(); 
                strMessage += "Extension:" + fi.Extension.ToString(); 
                strMessage += "FullName:" + fi.FullName.ToString(); 
                strMessage += "IsReadOnly:" + fi.IsReadOnly.ToString(); 
                strMessage += "LastAccessTime:" + fi.LastAccessTime.ToString(); 
                strMessage += "LastAccessTimeUtc:" + fi.LastAccessTimeUtc.ToString(); 
                strMessage += "LastWriteTime:" + fi.LastWriteTime.ToString(); 
                strMessage += "LastWriteTimeUtc:" + fi.LastWriteTimeUtc.ToString(); 
                if(File.Exists(strPath))
                {
                    strMessage += "Length:" + fi.Length.ToString();
                } 
                strMessage += "Name:" + fi.Name.ToString();
      

  7.   

    http://www.codeproject.com/KB/files/detailedfileinfo.aspx
      

  8.   

    using System.Diagnostics;FileVersionInfo fvi=new FileInfo(path); path文件路径
    fvi.CompanyName;估计就是你要的作者 还有其他属性可以类似获取