What does Windows error code 2 (ERROR_FILE_NOT_FOUND) mean?

 
Could be also:
ConstantTypeOS
STATUS_WAIT_2NTSTATUSWindows
KERN_PROTECTION_FAILUREKern returnMac
ippStsMisalignedBufIntel Ipp StatusAny
WDSMCCLIENT_CATEGORYHRESULTWindows
ENOENTerrnoAny
DEVICE_QUEUE_NOT_BUSYBugCheck CodeWindows
Previous Next
ERROR_INVALID_FUNCTION ERROR_PATH_NOT_FOUND

ERROR_FILE_NOT_FOUND

The file name does not identify an existing file

ERROR_FILE_NOT_FOUND means that Windows resolved the supplied path far enough to determine that the final file does not exist. It is commonly returned by file-opening APIs, process creation, library loading, and configuration readers.

Checks to make

  • Log the exact path after environment-variable and relative-path expansion.
  • Verify the current working directory when the caller uses a relative name.
  • Check spelling, extension, quoting, and whether a preceding cleanup removed the file.
  • Distinguish this result from ERROR_PATH_NOT_FOUND, where an intermediate directory is missing.

Handling the result

Create or restore the file only when absence is an expected recoverable state. Otherwise report the resolved path and the operation that failed. Repeated blind retries do not help unless another component is expected to create the file asynchronously.

References


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