Quick Answer (for the pros)
Rename the directory that's causing the error. If that's not an option, exclude it from the offending software's scan list. This error happens when a tool (like a backup agent or old command-line utility) tries to open a directory with file-only flags.
Why You're Seeing This
STATUS_FILE_IS_A_DIRECTORY (0xC00000BA) is a native NTSTATUS code that Windows returns when something calls CreateFile or NtCreateFile on a directory but doesn't include the FILE_FLAG_BACKUP_SEMANTICS flag. In plain English? A program tried to open a folder as if it were a regular file, and the OS said, “Nope, that's a directory, buddy.”
I see this most often in three scenarios:
- Old backup software (think Symantec Backup Exec or older Acronis versions) scanning a directory tree too aggressively.
- Command-line tools like
typeorcopyaccidentally pointed at a folder. - Custom scripts or PowerShell commands that iterate over files but hit a directory without handling it.
Last month, a client had this error pop up during a nightly robocopy script—turns out they'd accidentally named a folder “temp.log” and robocopy tried to read it as a log file.
Fix Steps (Start Here)
- Identify the directory. Check the exact path in the error message. If it's vague, use Process Monitor (procmon) from Sysinternals with a filter on
Result = NAME_COLLISIONorSTATUS_FILE_IS_A_DIRECTORYto find the culprit. - Rename the directory. If the directory name looks like a file extension (e.g., “data.log” or “backup.tmp”), rename it to something clean, like “data_log” or “backup_tmp”. This stops the software from misidentifying it.
- Exclude the directory from the software. For backup tools or antivirus, add that folder to the exclusion list. For robocopy, use the
/R:1and/W:1flags to skip errors and retry once, but better to exclude it explicitly. - For command-line errors: Verify you're not mixing up file and directory arguments.
type MyFolderwill trigger this—usedir MyFolderinstead. - For PowerShell: Use
-Fileand-Directoryswitches explicitly when pipingGet-ChildItem. Example:Get-ChildItem -Path C:\Data -File | ForEach-Object { \$_ }
Alternative Fixes (If the Above Fails)
Check for Junction Points or Symbolic Links
Sometimes a directory is a reparse point (like a junction to another drive). Tools that don't handle reparse points can throw 0xC00000BA. Run this command in an elevated prompt to see if your folder is a junction:
fsutil reparsepoint query "C:\Path\To\Folder"If it is, either remove the junction or use robocopy /XJ to skip junctions.
Update the Software
Old software doesn't handle modern NTFS features. If you're running something from 2010 on Windows 10 or 11, that's your problem. Update or replace it.
Run a File System Check
Corrupted MFT entries can cause this too. Run:
chkdsk C: /fReboot and let it run. I've seen this fix it once when a bad sector corrupted directory metadata.
Use a Different Tool
If a specific utility keeps failing, switch to a modern alternative. For backups, use VSS-aware tools like Veeam or Windows Backup. For file operations, use Total Commander or Far Manager instead of cmd.exe.
Prevention Tips
- Name directories clearly. Avoid using extensions like .log, .tmp, .bak for folder names. Keep them extensionless or use underscores:
logs_archiveinstead oflogs.bak. - Keep software updated. Old backup and sync tools cause more of these errors than anything else. Set a reminder to update annually.
- Test scripts on a small dataset. Before running a robocopy or PowerShell script on a production share, test it on a few folders. You'll catch this error before it kills your backup chain.
- Use Process Monitor proactively. When you see unexplained errors in logs, run procmon with a filter on the process name. It'll show you exactly which file or directory is triggering the error.
Real talk: this error is almost always a naming or tooling issue. Don't overthink it. Rename the folder or upgrade the tool, and you're done. I've wasted two hours on this once before I realized the folder was named “datafile”—the software was treating it as a file because of the name. Renamed it to “data_folder” and the error vanished.