4 Ways to Recover Data from Flash Drive with CMD

Last updated on 11/8/2020

Is it able to recover data from flash drive with cmd? Can we repair damaged flash drive without software? Before we go on with this article, we would like to make it clear to you that there are many free software available that could do the job of free flash drive recovery when it is hard for you to manage the cmd flash drive recovery.

recommendWe would recommend 12 free flash drive recovery software for flash drive recovery instead of cmd.

If you insist on a flash drive recovery with cmd, you may continue reading the following content that would introduce serveral ways for recovering your damaged flash drive or when your files were deleted from the flash drive.

Urgent Note

Once you found out you have lost data on your flash drive, here are some tips for making the best chance of successful recovery.

  • Stop using your flash drive by any cmd, we won't recommend you use cmd as the first rescue method to get data back since sometimes cmd would write data to your flash drive if you cannot manage it well
  • Do not try to repair it
  • Disconnect your flash drive from the device that you play

Table of Content

  1. Part 1 - Recover deleted files from flash drive using cmd [2 ways, video guide included]
  2. Part 2 - Repair damaged flash drive using cmd
  3. Part 3 - Format corrupted flash drive using cmd

recommendDownload safe, read-only 12 free flash drive recovery software to get data back instead of using cmd for flash drive recovery.

If the above 12 tools cannot help, or if you insist on using cmd for the recovery, be free to follow the guide below that includes video guide for the flash drive recovery.

usb drive recoveryPart 1 - Recovering files from usb pen drive using CMD

Way 1 - attrib -h -r -s /s /d *.*

  • Connect flash drive to a Windows computer, Windows 10/8/7 is recommended
  • Launch cmd by using Windows icon + R on your keyboard (There are many other ways to start cmd that you may search it on Google.com)
  • Type the volume letter of your flash drive in your computer
  • Type attrib -h -r -s /s /d *.*, press Enter. (if you did not type the drive letter in the ahead step, you may use  attrib -h -r -s /s /d f:*.* at this step when f is the drive letter of your flash drive, replace f with your own drive letter)

cmd pen drive recoveryRecover files from flash drive using cmd in Windows 10

Video - How to recover files from flash drive using cmd

What do these parameters in attrib command mean?

  1. -h: it gives the Hidden attribute to the files specified.
  2. -r: it refers to the read-only attribute (files can be read but cannot be changed).
  3. -s: it gives the System attribute to the files specified.
  4. /s: it tells the system to search the specified path (including subfolders).
  5. /d: it consists of process folders.

Way 2: attrib -r -a -s -h /s /d

  • Open cmd
  • Connect your flash drive to computer
  • Typle 'f' when f is your flash drive letter that you need to replace it with your own drive letter that your flash drive appears in your computer
  • Type ' attrib -r -a -s -h /s /d'

Video - how to recover deleted files from flash drive using attrib

Complicated and hard to handle the cmd? recommendOur recommendation -> 12 free flash drive recovery software free download

Option: Professional flash drive recovery software needed? Try iCare Pro Free which is able to help recovering files from flash drive with best file recovery.

Part 2 - Repair damaged flash drive using cmd

Fixing damaged flash drive using cmd is possible and you may follow the following steps.

You may check its drive letter by going to your computer and see what drive letter your flash drive is displayed there.

Way 3 - chkdsk *:/f (* is drive letter that shall be replaced by your own)

chkdsk h: /f - (You need to replace h with your own flash drive's drive letter)

cmd chkdskk to repair sd cardcmd chkdsk to repair usb drive

Video Guide - how to repair corrupted usb drive using cmd chkdsk

Part 3 - Format corrputed flash drive using cmd

Way 4 - format fs=ntfs quick

cmd to format samsung sd

When most flash drive errors could be fixed in this cmd 'format fs=ntfs quick', you may reply on this cmd for fixing damaged usb flash drives when you have rescued data from flash drive in the first part of this article.

Is it able to Recover Flash Drive from Virus?

Way 5 - Recover files hidden by virus from usb

The following video would show you a video about how to recover virus infected flash drive.

Also read: how to recover data after virus from pen drive

Recommend: This page shares details about CMD for data recovery in different data loss situations: Data recovery with command prompt>>

Common Data Losses on your flash drive

What happened to your flash drive? Are your data important to you? Can you recover data from flash drive by yourselft without sending it to a service center?

Here are some common flash drive data losses that you may run into these cases including

  • Deleted files on flash drive by accident, flash drive files did not go to a recycle bin
  • Thrid party software failure that brought damages to your flash drive
  • USB port problem caused by power failure or software damages
  • Hardware failure
  • Overheated
  • Malware damages
  • Other logical or physical damages, improper use

Hot Articles

Related Articles

Data Recovery Software Free Download > Pen Drive Recovery Software > How to Recover Data from USB Pen Drive Using Command Line