My USB flash drive suddenly gives the disk is write protected error, I cannot copy to it, delete from it or format it. No physical switch that I can see.
What causes write protection with no switch and how do I clear it?
My USB flash drive suddenly gives the disk is write protected error, I cannot copy to it, delete from it or format it. No physical switch that I can see.
What causes write protection with no switch and how do I clear it?
Write protection with no physical switch is set in software or signals a drive protecting itself, so the fixes run from software toggles to the harder truth, in order:
The harder truth when nothing clears it: a flash drive that refuses all write protection removal, resists diskpart and cannot be formatted is often failing, since flash memory that reaches its wear limit or detects errors switches itself to read only permanently to protect the remaining data, a genuine hardware end state rather than a software setting. This is the drive telling you it is dying, and the right response is recovering the data off it while it can still be read, since read only means readable, then retiring the drive, the write protection that will not clear being a symptom rather than a problem to solve.
diskpart attributes disk clear readonly did it, the drive had somehow got the readonly attribute set and clearing it restored writing immediately. Formatted it clean afterward. Glad it was the software cause and not the dying drive end state you described, though I backed up its contents first just in case per that warning.