<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSFileCoordinator/item(at:didMoveTo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFileCoordinator(im)itemAtURL:didMoveToURL:"
  },
  "title" : "item(at:didMoveTo:)"
}
-->

# item(at:didMoveTo:)

Notifies relevant file presenters that the location of a file or directory changed.

```
func item(at oldURL: URL, didMoveTo newURL: URL)
```

## Parameters

`oldURL`

The old location of the file or directory.

`newURL`

The new location of the file or directory.

## Discussion

If you move or rename a file or directory as part of a write operation, call this method to notify relevant file presenters that the change occurred. This method calls the [`presentedItemDidMove(to:)`](/documentation/Foundation/NSFilePresenter/presentedItemDidMove(to:)) method for any of the item’s file presenters.  If the item is a directory, this method calls [`presentedItemDidMove(to:)`](/documentation/Foundation/NSFilePresenter/presentedItemDidMove(to:)) on the file presenters for the item’s contents. Finally, it calls [`presentedSubitem(at:didMoveTo:)`](/documentation/Foundation/NSFilePresenter/presentedSubitem(at:didMoveTo:)) on the file presenter of any directory containing the item.

You must call this method from a coordinated write block. Calling this method with the same URL in the `oldURL` and `newURL` parameters is harmless. This call must balance a call to [`item(at:willMoveTo:)`](/documentation/Foundation/NSFileCoordinator/item(at:willMoveTo:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)