{"id":112310,"date":"2026-05-08T07:00:00","date_gmt":"2026-05-08T14:00:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/oldnewthing\/?p=112310"},"modified":"2026-05-08T09:54:36","modified_gmt":"2026-05-08T16:54:36","slug":"20260508-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20260508-00\/?p=112310","title":{"rendered":"Developing more confidence when tracking renames via <CODE>Read&shy;Directory&shy;ChangesW<\/CODE>"},"content":{"rendered":"<p>A customer was using <code>Read\u00adDirectory\u00adChangesW<\/code> to monitor the contents of a directory, and they were concerned about the <code>FILE_<wbr \/>ACTION_<wbr \/>RENAMED_<wbr \/>OLD_<wbr \/>FILE<\/code> and <code>FILE_<wbr \/>ACTION_<wbr \/>RENAMED_<wbr \/>NEW_<wbr \/>FILE<\/code> pair of actions. The documentation doesn&#8217;t guarantee that the two always occur consecutively, or even that they always appear in pairs. For peace of mind, the customer was looking for a way to match up each <code>FILE_<wbr \/>ACTION_<wbr \/>RENAMED_<wbr \/>OLD_<wbr \/>FILE<\/code> with a <code>FILE_<wbr \/>ACTION_<wbr \/>RENAMED_<wbr \/>NEW_<wbr \/>FILE<\/code> to make sure they were tracking the rename properly.<\/p>\n<p>Yes, you can do it by switching from <code>Read\u00adDirectory\u00adChangesW<\/code>. to <code>Read\u00adDirectory\u00adChanges\u00adExW<\/code> and asking for <code>Read\u00adDirectory\u00adNotify\u00adExtended\u00adInformation<\/code>. This produces the <code>FILE_<wbr \/>NOTIFY_<wbr \/>EXTENDED_<wbr \/>INFORMATION<\/code> structure, and that structure includes the <code>FileId<\/code> of the affected file. You can then match that up between the <code>FILE_<wbr \/>ACTION_<wbr \/>RENAMED_<wbr \/>OLD_<wbr \/>FILE<\/code> and <code>FILE_<wbr \/>ACTION_<wbr \/>RENAMED_<wbr \/>NEW_<wbr \/>FILE<\/code> to confirm that they are the two halves of the same rename operation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can track the file ID.<\/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-112310","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>You can track the file ID.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/112310","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=112310"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/112310\/revisions"}],"predecessor-version":[{"id":112311,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/112310\/revisions\/112311"}],"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=112310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=112310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=112310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}