67

I have a USB flash drive, which I may have mucked up, so I used DISKPART's CLEAN to clean it up. I created a simple volume, and tried to format it. (This is all using Windows' disk management.) I was told The system cannot find the file specified.

So I tried using DISKPART (as an admin):

DISKPART> select volume 9

Volume 9 is the selected volume.

DISKPART> format recommended

DiskPart has encountered an error: The system cannot find the file specified.
See the System Event Log for more information.

DISKPART>

As you can see, no luck.

When I plug the drive in, the computer makes a beep noise as though it has recognised something, but nothing appears in My Computer

How can I format the disk so I can use it again?

ACarter
  • 1,494

10 Answers10

125

Run diskpart and perform these commands:

LIST DISK
SELECT DISK x
CLEAN 

(x being the number returned in the first command for the USB disk.)

Close diskpart.

Open Windows DiskAdministrator GUI.

You should now see the USB disk as an empty hard drive and be able to partition and format the USB disk as normal.

Tonny
  • 33,276
33

I had this issue when the USB key had been formatted with a linux install iso previously. To fix it, I ran the linux fdisk utility, removed all partitions, and then ran:

dd if=/dev/zero of=/dev/XXX count=1 bs=4096

where XXX was sdb in my case.

This wiped the partition table completely, and on new insertion on windows, it was able to do a standard format. I clued in that it had something to do with the partition table, since windows disk manager showed the old partition layout after attempting to create a volume+format, despite the fact that I'd picked a different volume and file system size (i.e. attempting to create a 4G volume and filesystem restored the previous 2G partition in the disk manager display, despite starting from a non-partitioned state).

19

Just wanted to add another possible reason/solution for this error message. Problem: I had previously used this USB drive as a Chromebook recovery image holder and Win8 was giving me errors trying to format it. XP formatted it ok and showed a drive letter when the USB drive was inserted while Win8 did not.

Solution: I ended up using the Chromebook Recovery utility to erase the USB drive again (even though it had been formatted a few times in Windows) and Win8 was then happy with it again. https://support.google.com/chromebook/answer/6002417?hl=en

4

I was unable to format a 32GB USB stick using tools from either Ubuntu, win8 disk manager or diskpart, after my son formatted it for a Linux Anaconda boot device. Fix was to use diskpart-list disk-select disk-delete partition override and finally CLEAN. This removed underlying attributes and I was able to create a new primary partition and format as NTFS again!

4

I recommend using Mark Tomlin's answer at Recovering a Partially Formatted USB Thumb Drive. If that doesn't work, try then using diskpart to clean the disk again and convert to GPT. The conversion to GPT seems to restore the USB drive to a usable state, which convert to MBR does not always manage. You should now be able to create a primary partition and format it. I then had a little difficulty in converting back to MBR, but managed it OK as explained in my answer on the other post. I hope that this helps.

2

I had the same issue (CLEAN command => error with Access Denied), and luckily my usb key was USB-C.

I simply connected it to my Android phone and clicked on Format.

Then it was immediately fixed, even in Windows 10 :)

Pleymor
  • 131
1

I had this issue when I had a hard drive in a dock plugged into a SS USB Port. I changed to a standard USB port and worked like a charm. This was odd though because this only happened sometimes in the SS USB Port. But hope this helps!

Thanks.

Jayden
  • 11
1

UNetbootin can create a bootable Live USB drive, or it can make a "frugal install" on your local hard disk if you don't have a USB drive. It loads distributions either by downloading a ISO (CD image) files for you, or by using an ISO file you've already downloaded.

Try using UNetbootin to format and create a live linux on your thumb drive directly. If this does not work, I would use UNetbootin to create a PartedMagic live cd/dvd/usb (device other than the one you are having troubles with) and boot to it and try to access the problem usb device and wipe it clean with Parted Magic.

Logman
  • 3,660
0

None of the answers solved the issue here today in 2023 so I ended up using SD Memory Card Formatter for Windows/Mac from sdcard.org Association to format and fix the USB drive. Hope this helps.

-2

What works for me is trying different slots until it recognizes it and then trying the diskpart method. But if it doesn't work I use EaseUS Partition Master and then it does. This can often happen after making a boot disk with TransMac.