Programming Field

Recover - DOS/Command Prompt Reference

[MS-DOS 5.0? or earlier/Windows NT series/2000, XP or later] Extracts readable portions of a specific file from a damaged disk to make them accessible. Administrator privileges are required to execute this operation.

Syntax

recover[.exe] <file-name>
<file-name>

Specifies the file name to extract. You can include the drive path (if omitted, the current directory will be used).

<file-name> must represent the name of a single file. You cannot use a directory name alone or use wildcards.

Details

The ‘Recover’ command checks the sectors where the data of the specified file is written. If there are unreadable sectors (bad sectors), it skips them to enable reading of the data. While file data is typically stored across one or multiple sectors, if there are bad sectors within them (due to disk damage, for example) that are unreadable, ‘Recover’ skips those sectors for the specified file. Data that existed within the bad sectors will be lost, but ‘Recover’ ensures that the file's data is only located in healthy sectors. As a result, it becomes accessible for reading using other commands or programs.

To check and mark sectors as ‘bad’, you can use Chkdsk.