ERROR_NOT_SAME_DEVICE - 17 (0x11)

The system cannot move the file to a different disk drive.

Updated: Feb 21, 2026

Technical Background

The ERROR_NOT_SAME_DEVICE error code, with the numeric value of 17 and the hexadecimal representation of 0x11, is a specific error returned by Windows when an operation to move or copy a file fails because it cannot be performed between different disk drives. This error typically occurs during file system operations such as MoveFile, CopyFile, or similar functions that are part of the Windows API.

Error Details

The ERROR_NOT_SAME_DEVICE error indicates that an attempt was made to move a file from one physical disk drive to another, which is not supported by the underlying file system. This operation requires that both source and destination files reside on the same logical volume or partition within the same disk drive.

Common Causes

  • Invalid Parameter Values: The source and destination paths provided in the API call do not refer to files or directories on the same physical disk drive.
  • Incorrect Object Type: The operation was attempted on a file or directory that is not supported by the move operation, such as a symbolic link or a read-only file.

Real-World Context

This error can occur in various scenarios where file operations are performed across different physical drives. For example, when attempting to move files between external USB drives or network shares mounted on different physical disks.

Is This Error Critical?

The ERROR_NOT_SAME_DEVICE is not a critical error from a system stability perspective. However, it can prevent the intended operation from completing successfully and may require user intervention to resolve.

How to Diagnose

To diagnose this issue, developers should:

  • Review Operation Context: Ensure that both source and destination paths are on the same physical disk drive.
  • Validate Parameters: Verify that the parameters passed to the file system operation are correct and valid.
  • Confirm Object Types: Check if the objects being operated upon are supported by the move or copy operations. For instance, symbolic links might not be moved in a single operation.

How to Resolve

To resolve this issue, developers should:

  • Correct Parameter Usage: Ensure that both source and destination paths refer to files or directories on the same physical disk drive.
  • Adjust Operation Context: If moving files between different drives is necessary, consider performing operations in a way that respects file system constraints. For example, copying files to a temporary location on the target drive before deleting them from the original location.

Developer Notes

Developers should be aware of the limitations imposed by the underlying file system when performing file operations across different physical disk drives. Ensuring that source and destination paths are on the same logical volume can prevent this error from occurring.

Related Errors

  • ERROR_PATH_NOT_FOUND: Occurs if a specified path does not exist.
  • ERROR_ACCESS_DENIED: Occurs if the user lacks sufficient permissions to perform the operation.
  • ERROR_INVALID_PARAMETER: Occurs if one or more parameters passed in the API call are invalid.

FAQ

Q: Can this error occur when moving files within a single partition?

A: No, ERROR_NOT_SAME_DEVICE only occurs when attempting to move files between different physical disk drives. Moving files within the same partition on the same drive will not trigger this error.

Q: What should I do if I need to move files across multiple drives?

A: Consider using a temporary file location or a script that handles the operation in stages, ensuring each step adheres to the constraints of the underlying file system.

Summary

The ERROR_NOT_SAME_DEVICE error code is specific to operations that attempt to move files between different physical disk drives. Developers should ensure that source and destination paths are on the same logical volume or handle cross-drive operations in a way that respects these limitations.