<!--
{
  "availability" : [
    "macOS: 10.8.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSDocument/move(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDocument(im)moveDocumentWithCompletionHandler:"
  },
  "title" : "move(completionHandler:)"
}
-->

# move(completionHandler:)

Moves the document to a user-selected location.

```
func move(completionHandler: ((Bool) -> Void)? = nil)
```

## Parameters

`completionHandler`

The completion handler block object passed in to be invoked after moving is completed, regardless of success, failure, or cancellation of moving action.

## Discussion

This method presents the user with a move panel if `[self fileURL]` is non-nil and then tries to save the document to the new location by invoking the [`move(to:completionHandler:)`](/documentation/AppKit/NSDocument/move(to:completionHandler:)) method if the user accepts the location presented by the panel. If a file with the same name already exists at that location, the user will be asked to choose between replacing the pre-existing file, renaming the current document, or canceling the move process. If `[self fileURL]` is `nil`, then the `[self runModalSavePanelForSaveOperation:NSSaveAsOperation delegate:didSaveSelector:contextInfo:]` message is sent instead.

## See Also

[`moveToUbiquityContainer(_:)`](/documentation/AppKit/NSDocument/moveToUbiquityContainer(_:))

Moves the document to the user’s iCloud storage.



---

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)