DsoFile一个查看修改windows文件摘要的好东东
同时可以操作自定义属性
基于COM,所有开发语言都可以使用
asp中使用
<%
Set OPR = Server.CreateObject(“DSOFile.OleDocumentProperties”)
OPR.open(“E:/PaiMei_demo_001.jpg”)
Response.Write(“Author:” & OPR.SummaryProperties.Author)
OPR.SummaryProperties.Author = “0123456789”
OPR.Save
response.Write(“<br />”)
Response.Write(“Author:” & OPR.SummaryProperties.Author)
%>
c#中使用
DSOFile.OleDocumentPropertiesClass dsoFile = new DSOFile.OleDocumentPropertiesClass();
dsoFile.Open(filename, false, DSOFile.dsoFileOpenOptions.dsoOptionDefault);
dsoFile.Save();
dsoFile.Close(false);
什么是 Dsofile?
Dsofile 实际上是 Microsoft Developer Support OLE File Property Reader 2.0 Sample 的文件名 (Dsofile.dll)。(您必须承认,Microsoft 自有诀窍想出十分诡异的名称。)不过,不要被这个名称吓倒哦。实际上,Dsofile(您可以从 Microsoft 下载中心免费获取它)是一种对脚本编写者极其有用的工具:它为读取和写入您的所有文件的摘要信息属性集提供了一种快速而简便的方法。
微软只提供了32位版本下载,这里为方便使用编译了一个64位版本,微软提供源码下载
反正编译也是分分钟的事情。