If you are stuck with a PEN drive or SD CARD which is can’t be formated or even not copying , moving any files, here is the few method you can try for disable write protected disk or format it.
Using with command:-
Click on your Start Menu and type CMD in the Search field. It should show up at on top of your Start menu. Right click on it and select Run as Administrator.
Type on Command section “DISKPART” and hit Enter diskpart show partition of drive.
Now type ”LIST DISK” hit Enter and then you see two disk being available first is HDD as DISK 0, and another is USB FLASH drive as DISK 1 .
At this point select DISK 1 and hit Enter after that you see DISK 1 is selected. To remove the write protected with Diskpart type the command “ATTRIBUTES DISK CLEAR READONLY“. If it work , that will confirmed by the line DISK ATTRIBUTES CLEARED SUCCESSFULLY.