{"id":13463,"date":"2010-07-09T07:00:00","date_gmt":"2010-07-09T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2010\/07\/09\/whats-the-difference-between-lastwritetime-and-changetime-in-file_basic_info\/"},"modified":"2010-07-09T07:00:00","modified_gmt":"2010-07-09T07:00:00","slug":"whats-the-difference-between-lastwritetime-and-changetime-in-file_basic_info","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20100709-00\/?p=13463","title":{"rendered":"What&#039;s the difference between LastWriteTime and ChangeTime in FILE_BASIC_INFO?"},"content":{"rendered":"<p>The <code>FILE_BASIC_INFO<\/code> structure contains a number of fields which record the last time a particular action occurred. Two of the fields seem to describe the same thing.<\/p>\n<blockquote class=\"q\">\n<dl>\n<dt>Last&shy;Write&shy;Time  <\/dt>\n<dl>\n<dd>The time the file was last written to.<\/p>\n<dl>\n<dt>Change&shy;Time  <\/dt>\n<dl>\n<dd>\n<p>The time the file was changed.<\/p>\n<\/dd>\n<\/dl>\n<\/dl>\n<\/dd>\n<\/dl>\n<\/dl>\n<\/blockquote>\n<p> What&#8217;s the difference between writing to a file and changing it?\n I&#8217;m told that the difference is metadata. The Last&shy;Write&shy;Time covers writes to the file&#8217;s data stream (which you accomplish via the <code>Write&shy;File<\/code> function). On the other hand, the Change&shy;Time also includes changes to the file metadata, such as changing its file attributes (hidden, read-only, <i>etc<\/i>.) or renaming the file.<\/p>\n<p> (And don&#8217;t forget that <a href=\"http:\/\/blogs.technet.com\/filecab\/archive\/2006\/11\/07\/disabling-last-access-time-in-windows-vista-to-improve-ntfs-performance.aspx\"> Last&shy;Access&shy;Time updates are off by default now<\/a>.) <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The FILE_BASIC_INFO structure contains a number of fields which record the last time a particular action occurred. Two of the fields seem to describe the same thing. Last&shy;Write&shy;Time The time the file was last written to. Change&shy;Time The time the file was changed. What&#8217;s the difference between writing to a file and changing it? I&#8217;m [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-13463","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>The FILE_BASIC_INFO structure contains a number of fields which record the last time a particular action occurred. Two of the fields seem to describe the same thing. Last&shy;Write&shy;Time The time the file was last written to. Change&shy;Time The time the file was changed. What&#8217;s the difference between writing to a file and changing it? I&#8217;m [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/13463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=13463"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/13463\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=13463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=13463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=13463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}