| Previous | Next |
| ERROR_INVALID_DRIVE | ERROR_NOT_SAME_DEVICE |
ERROR_CURRENT_DIRECTORY
The target directory is currently in use as a working directory
ERROR_CURRENT_DIRECTORY is returned when an operation conflicts with the active current directory. A process cannot remove or invalidate a directory while it still depends on that location as its working directory.
Resolution steps
- Change the current directory to a stable existing location before removal.
- Check child processes launched with the target as their working directory.
- Avoid global current-directory changes in multithreaded applications.
- Use absolute paths so cleanup does not depend on process-wide state.
Handling
Move away from the directory, release users of it, and retry once. Continuous retry without changing state is ineffective.
References
Looking for a different code? Search another status or error code.
