如何修改C#中的任何文件细节? [英] How to modify any file details in C#?

查看:78
本文介绍了如何修改C#中的任何文件细节?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想用C#代码更改任何文件(例如:txt,doc,...)的详细信息(标题,描述,公司,产品......) 。这该怎么做?我搜索过,但我发现阅读并获取文件的详细信息,而不是更改它们。谢谢。

Hi all,
I want to change the details (Title, Description, Company, Product,...) of any file (e.g: txt, doc,...) with C# code. How to do this? I searched, but I found reading and getting the details of the file, not changing them. Thanks.

推荐答案

标题,描述,公司,产品是从文件的文件结构中读取的,如果不知道每个文件的文件格式,就无法轻易更改。
"Title,Description,Company, Product" are read from the file structure of the file and cannot be changed easily without knowing the file format for each file.


以下链接显示了如何使用你必须下载的dll来完成它:



http:// social.msdn.microsoft.com/Forums/vstudio/en-US/bb887b05-2018-4978-b115-c8c98e3542ce/setting-file-infoattributes-author-subject-?forum=csharpgeneral [ ^ ]



p://www.developerfusion.com/code/5093/retrieving-the-summary-properties-of-a-file/ [ ^ ]
The following links show how it can be done using a dll you have to download:

http://social.msdn.microsoft.com/Forums/vstudio/en-US/bb887b05-2018-4978-b115-c8c98e3542ce/setting-file-infoattributes-author-subject-?forum=csharpgeneral[^]

http://www.developerfusion.com/code/5093/retrieving-the-summary-properties-of-a-file/[^]


这篇关于如何修改C#中的任何文件细节?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆