Fix NS_E_BAD_STAMPNUMBER (0XC00D0066) on Windows 10/11
NS_E_BAD_STAMPNUMBER means NTFS volume metadata corruption. Quick chkdsk fix, but sometimes needs more. Here's the real fix.
Quick answer
Run chkdsk /f X: from an elevated command prompt (replace X with your drive letter), then reboot. If that doesn't clear it, you'll need to run chkdsk /f /r and possibly check the disk's SMART status.
What this error actually means
NS_E_BAD_STAMPNUMBER (0XC00D0066) is a Windows error that crops up when the NTFS file system can't verify the integrity of a volume's control block. The 'stamp number' is a metadata sequence counter that NTFS uses to ensure consistency during writes. When it's wrong, Windows assumes corruption — and it's right to. I've seen this most often after a sudden power loss or an improper shutdown, like yanking the plug on a USB drive or holding the power button too long. It can also show up on drives that are starting to fail physically.
Don't panic though. In about 80% of cases, a standard chkdsk run fixes it. But if the drive has bad sectors, you'll need the full treatment. Let me save you the trial and error I went through.
Step-by-step fix
- Identify the affected drive. Open File Explorer, right-click the drive showing the error, and note its drive letter (e.g., D:, E:, F:). If you're not sure, check Event Viewer under Windows Logs > System for the error – it'll list the drive.
- Open an elevated Command Prompt. Hit the Start button, type
cmd, right-click Command Prompt, and choose 'Run as administrator'. Yes, you need admin rights. - Run chkdsk with the /f flag. Type
chkdsk /f X:(replace X with your drive letter) and press Enter. It'll scan the volume and fix any logical errors in the file system metadata, including the stamp number. If the drive is in use, it'll ask to schedule a scan on next boot. Say yes. - Reboot. Restart your PC if you scheduled the scan. The scan runs before Windows fully loads, so you'll see a blue screen with a progress bar. Let it finish completely — don't interrupt it.
- Check if the error is gone. After reboot, try accessing the drive. If the error still pops up, move to the next step.
- Run chkdsk with /f and /r. This adds sector-by-sector scanning. Type
chkdsk /f /r X:in an elevated command prompt. This takes a LOT longer — could be hours on a large drive — but it repairs bad sectors and recovers readable data. Do this overnight if possible.
If chkdsk doesn't work
Sometimes chkdsk finishes without errors, but the stamp number error returns. That's a red flag for physical problems. Here's what to try next:
- Check SMART status. Download a free tool like CrystalDiskInfo or use
wmic diskdrive get statusin command prompt. If it shows 'Caution' or 'Bad', the drive is dying. Back up your data immediately. - Test the drive with manufacturer tools. For Seagate drives, use SeaTools. For Western Digital, use Data Lifeguard Diagnostic. These run deeper tests than chkdsk and can confirm hardware failure.
- Try a different USB port or cable. If it's an external drive, a flaky cable can cause intermittent errors that mimic corruption. Sounds trivial, but I've seen it fool people for days.
- Move the drive to another machine. Test it on a different computer. If the error disappears, the issue is with your original system's USB controller or power supply.
Prevention tip
The #1 cause of this error is unexpected disconnection. Always use the 'Safely Remove Hardware' icon to eject external drives. Yes, even if you've done it without a problem a hundred times. For internal drives, make sure your system has a UPS (uninterruptible power supply) to handle sudden power loss — one brownout can corrupt a volume's stamp number. And run chkdsk /f on all your drives every 6 months, just as maintenance. It's boring, but it beats data recovery bills.
Was this solution helpful?