What does Windows error code 18 (ERROR_NO_MORE_FILES) mean?

 
Could be also:
ConstantTypeOS
KERN_INVALID_VALUEKern returnMac
ippStsSingularityIntel Ipp StatusAny
EXDEVerrnoAny
TRAP_CAUSE_UNKNOWNBugCheck CodeWindows
Previous Next
ERROR_NOT_SAME_DEVICE ERROR_WRITE_PROTECT

ERROR_NO_MORE_FILES

Directory enumeration is complete

ERROR_NO_MORE_FILES is often a normal termination condition from enumeration APIs such as FindNextFile. It does not necessarily indicate that the directory is empty or that an earlier result was invalid.

Correct interpretation

  • Treat it as successful end-of-sequence after processing all returned entries.
  • Distinguish it from errors such as access denied or path not found.
  • Close the search handle after enumeration finishes.
  • Do not retry indefinitely expecting another entry.

Logging

Normally this condition should not be logged as an error. Log it only when the application expected a specific entry that was never encountered.

References


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