Disk part to recover drives

Having read many comments on failed flashing then losing the drive used.
Microsoft has a Tool called Disk Part. You can find it in the search from start button. right click and run as administrator.
To recover a failed flash drive, stick, card or drive, this will get your drive back.
If you google Disk part youll find guides on using it.
With the Drive connected…
Basically after running Disk Part as administrator you then use these commands in the command box after each ‘Disk Part’ prompt;
list disk (note disk is spelt with K)
find the drive you need to recover (be sure you note the number of the correct drive)Then;
select disk * (* your disk)
Then
clean.
Disk Part will now report drive as clean.
list disk (again)
your ‘clean disk’ will now have an * before it.
then
create partition primary
then
select partition 1
then
format FS=fat32 label=data quick
when that is done
assign
exit
your drive now has full size back

Thanks for the post @derek. I’d also like to clarify that “diskpart” is a Windows command line tool. To run as administrator, search for cmd near the start button, right click on it and run as administrator. Then type diskpart
Also, you may need to use FS=NTFS (instead of fat32) if the drive is relatively large.

i have found easeus a great gui tool to recover partitions on messed up SD cards

https://www.easeus.com/partition-manager/