What does Windows error code 4307 (ERROR_NOT_EMPTY) mean?

 
Previous Next
ERROR_EMPTY ERROR_MEDIA_UNAVAILABLE

ERROR_NOT_EMPTY

The object must be emptied before this operation

Some RSM configuration changes are destructive and are permitted only when the target no longer contains dependent media or child objects. A library can still hold cartridges, a pool can still contain media or nested pools, and a drive can still contain a mounted cartridge. This status protects inventory and ownership relationships; it is not resolved by merely waiting unless an asynchronous dismount or eject is already in progress.

Enumerate the target and remove or relocate the remaining items through normal RSM operations. Dismount media before attempting physical ejection, move cartridges to an appropriate pool before deleting a pool, and complete queued library work before changing library structure. Avoid deleting database records directly because that can orphan physical media state.

What to inspect

  • List all immediate children and contained media.
  • Check for queued dismount, move or eject requests.
  • Use supported move or delete APIs in dependency order.

References


Looking for a different code? Search another status or error code.