Why This Error Happens
Error 267 occurs when a command-line operation (such as CD, DIR, or a batch script) targets a path that Windows does not recognize as a valid directory. This typically happens because the target is actually a file rather than a folder, the path contains invalid characters or incorrect syntax, or the directory has become corrupted or was deleted while still referenced by another process. It can also surface when a drive letter is mapped incorrectly or a network path is temporarily unreachable.
Step-by-Step Resolution Guide
-
Verify the Path is a Folder, Not a File
Open File Explorer and navigate to the exact path you’re using. Confirm the final segment is a directory and not a file with a similar name (e.g.,C:\Data\ReportsvsC:\Data\Reports.txt). -
Check for Invalid Characters or Syntax Errors
Reopen Command Prompt and re-type the path manually instead of pasting it — hidden Unicode characters or trailing spaces often cause this. Ensure the path doesn’t end with a backslash before a quotation mark, e.g., use"C:\Data\Reports"not"C:\Data\Reports\". -
Run CHKDSK to Rule Out Corruption
Open Command Prompt as Administrator and run:
chkdsk C: /f /r
Restart if prompted. This repairs file system errors that can make directory entries unreadable.
- Recreate the Directory
If the folder appears corrupted, create a new directory with a simple name (avoid spaces/special characters) at a known path, such as:
mkdir C:\TempFix
Then move your files into it and retry the original operation.
- Check Network/Mapped Drive Status (if applicable)
If the path is on a mapped network drive, runnet usein Command Prompt to confirm the drive is connected. Reconnect it via:
net use Z: \\ServerName\ShareName /persistent:yes
Alternative or Verification Steps
- After applying a fix, re-run the original command or application action targeting the same path — if no Error 267 appears and the directory listing/output loads correctly, the issue is resolved.
- If the error persists, try running the command from a different drive (e.g., copy the folder to
D:\Test) to isolate whether the issue is drive-specific or path-specific.