如何更改文件的日期时间 [英] How to change datetime of a file
本文介绍了如何更改文件的日期时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道如何使用C/C ++代码更改文件的最后修改日期时间?
I would like to know how to change last modified datetime of a file using C/C++ code?
推荐答案
您可以使用SetFileTime [_utime [
You could use SetFileTime[^] function or _utime[^] function family
in order to change the last modified time of a file. :)
如果要修改上次修改的日期时间,则必须具有对该文件的完全访问权限.访问它,打开它并在其中添加任何内容(空格!)或您要修改的任何内容...它将自动更改修改的日期时间!
还有什么?
If you want to modify last modified datetime then you must be having full access to the file. Access it, open it and append anything to it (a space!) or whatever you want to modify... it will automatically change the modified datetime!
What else?
这篇关于如何更改文件的日期时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文