<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileManagerDelegate/fileManager(_:shouldProceedAfterError:movingItemAtPath:toPath:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSFileManagerDelegate(im)fileManager:shouldProceedAfterError:movingItemAtPath:toPath:"
  },
  "title" : "fileManager(_:shouldProceedAfterError:movingItemAtPath:toPath:)"
}
-->

# fileManager(_:shouldProceedAfterError:movingItemAtPath:toPath:)

Asks the delegate if the move operation should continue after an error occurs while moving the item at the specified path.

```
optional func fileManager(_ fileManager: FileManager, shouldProceedAfterError error: any Error, movingItemAtPath srcPath: String, toPath dstPath: String) -> Bool
```

## Parameters

`fileManager`

The file manager object that attempted to move the item.

`error`

The error that occurred while trying to move the item in `srcPath`.

`srcPath`

The path of the file or directory that the file manager tried to move.

`dstPath`

The path of the intended destination for the item in `srcPath`.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the operation should proceed or <doc://com.apple.documentation/documentation/Swift/false> if it should be aborted. If you do not implement this method, the file manager assumes a response of <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

The file manager calls this method when there is a problem moving the item to the specified location. If you return <doc://com.apple.documentation/documentation/Swift/true>, the file manager proceeds to remove the item from its current location as if the move operation had completed successfully.

This method performs the same task as the [`fileManager(_:shouldProceedAfterError:movingItemAt:to:)`](/documentation/Foundation/FileManagerDelegate/fileManager(_:shouldProceedAfterError:movingItemAt:to:)) method, which is preferred over this method in macOS 10.6 and later.

## See Also

[`-  moveItemAtPath:toPath:error:`](/documentation/Foundation/FileManager/moveItem(atPath:toPath:))

Moves the file or directory at the specified path to a new location synchronously.

[`-  moveItemAtURL:toURL:error:`](/documentation/Foundation/FileManager/moveItem(at:to:))

Moves the file or directory at the specified URL to a new location synchronously.



---

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)