File time stamp does not change with data update

风流意气都作罢 提交于 2020-01-11 06:10:53

问题


I have customer which claims that he has one application which updates the data in log file but that application does not change the time stamp of the log file.

I have question why would any application has such behavior.


回答1:


It's a new FEATURE of Windows 2008 (R2), Windows 7 and up. Modified time is not updated anymore like it used to in Windows 2003.

http://blogs.technet.com/b/asiasupp/archive/2010/12/14/file-date-modified-property-are-not-updating-while-modifying-a-file-without-closing-it.aspx

And

http://social.technet.microsoft.com/Forums/en-US/winservergen/Thread/2B8BACA2-9C1B-4D80-80ED-87A3D6B1336F




回答2:


There is a good workaround for build automation:

copy /b <Filename> +,,

I found this trick here: https://superuser.com/questions/292630/how-can-i-change-the-timestamp-on-a-file. The strange is that "copy /?" does not say about /b option.



来源:https://stackoverflow.com/questions/3226513/file-time-stamp-does-not-change-with-data-update

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!