How to fix Error 336 on Windows 11

Why This Error Happens

Error 336 (ERROR_DIRECTORY_NOT_SUPPORTED) occurs when an application or script attempts to perform a file-specific operation—such as opening, reading, or writing data—on a path that Windows recognizes as a directory rather than a file. This commonly happens due to a hardcoded or misconfigured file path in an application, a broken symbolic link/junction point, or a backup/sync tool trying to treat a folder as if it were a single file. It can also surface when File Explorer or a third-party utility encounters a corrupted directory entry in the NTFS file table.

Step-by-Step Resolution Guide

  1. Identify the exact path causing the error
    Check the application log or error dialog for the specific file/folder path. In most cases, this appears in %LOCALAPPDATA%\[AppName]\Logs or Event Viewer under Windows Logs > Application.

  2. Verify the path type using Command Prompt
    Open Command Prompt as Administrator and run:

   dir "C:\path\to\suspected\file"

If the output shows <DIR> next to the item, the application is incorrectly treating a folder as a file.

  1. Check for broken symbolic links or junctions
    Run the following to list reparse points that might be misconfigured:
   fsutil reparsepoint query "C:\path\to\suspected\file"

If it returns a junction/symlink pointing to an invalid target, remove it with:

   rmdir "C:\path\to\suspected\file"

(Only use rmdir, not del, to safely remove a link without deleting the target’s contents.)

  1. Repair the file system to rule out NTFS corruption
    Run:
   chkdsk C: /f /r

Restart when prompted. This resolves cases where a corrupted MFT entry causes a file to be misidentified as a directory.

  1. Update or reinstall the affected application
    If the error originates from a specific program (e.g., a backup tool or IDE), update it to the latest version, as this is often a known bug related to hardcoded path assumptions. If updating doesn’t help, reinstall the application to reset its default path configurations.

Alternative or Verification Steps

  • After applying the fix, retry the original action (file open, backup job, or sync task) and confirm Error 336 no longer appears in the Event Viewer or application log.
  • If the issue persists, try renaming or moving the folder in question, then recreate the expected file manually at that path to force the application to generate a fresh, correctly typed file entry.