如何更改文件的日期时间

编程入门 行业动态 更新时间:2024-10-28 13:23:28
本文介绍了如何更改文件的日期时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想知道如何使用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?

更多推荐

如何更改文件的日期时间

本文发布于:2023-07-23 19:21:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1199607.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何更改   日期   文件   时间

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!