本文介绍了如何设置文件的详细信息(例如标题,作者,备注)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚学会了使用shell32.dll读取文件的详细信息,但是我也需要编写它们.我找不到该问题的任何解决方案,但我认为可以实现.
有人可以帮我吗?
非常感谢. :)
I just learned to read the details of a file with shell32.dll, but I need to write them as well. I couldn''t find any solution to the question but I think it can be realized.
Could anyone help me with it?
Thanks a lot. :)
推荐答案
using System.IO;
public void ChangeFileAttribute(string FileNameWithPath)
{
FileInfo Fln = new FileInfo(FileNameWithPath);
Fln.CreationTime =DateTime.Now.Date;
Fln.LastWriteTime = DateTime.Now.Date;
Fln.LastAccessTime=DateTime.Now.Date;
}
这篇关于如何设置文件的详细信息(例如标题,作者,备注)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!