Home > Commands N-Z > Commands U

UNFORMAT


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Restores a disk that was erased by using the FORMAT command.

UNFORMAT restores only local hard disk drives and floppy disk drives; it cannot be used on network drives. The UNFORMAT command can also rebuild a corrupted disk partition table on a hard disk drive.


Syntax

UNFORMAT drive: [/J] [/P] [/U]

UNFORMAT drive: [/L] [/TEST] [/P]

UNFORMAT drive: [/J] [/L] [/PARTN]


Parameters
drive: (v5.0)
Specifies the drive that contains the disk on which you want to recover files.

Switches
/J (v5.0)
Verifies current root directory and FAT matches the last MIRROR file. This does NOT rebuild the disk.
/L (v5.0)
Lists every file and subdirectory found by UNFORMAT. If you do not specify this switch, UNFORMAT lists only subdirectories and files that are fragmented. To suspend scrolling of the displayed list, press CTRL+S (^S); to resume scrolling, press any key.
/P (v5.0)
Sends output messages to the printer connected to LPT1.
/PARTN (v5.0)
Restores corrupted partition table using MIRROR from floppy diskette.
/TEST (v5.0)
Shows how UNFORMAT would recreate the information on the disk, but does not actually unformat the disk.
/U v5.0 through v6.0.
Used to tell the operating system to recover files from a formatted disk without using the MIRROR file information.

Related

For information about formatting a disk, see the FORMAT command.


Notes
Limitation on the UNFORMAT command

If the FORMAT command was used with the /U switch, UNFORMAT cannot restore the disk to its previous condition.


Unformatting a disk

The UNFORMAT command can restore your disk by using information in the root directory and file allocation table on the disk.

As UNFORMAT rebuilds the disk, it displays how many subdirectories it has found; if you specified the /L switch, it also shows you all files in each subdirectory.

If UNFORMAT finds a file that appears to be fragmented (that is, stored in separate places on the disk), it cannot recover the file because it cannot locate the remaining portions of the file. In this case, the UNFORMAT command prompts you to confirm whether you want UNFORMAT to truncate the file (that is, recover only the first part of the file that it can locate) or delete the file altogether.

If UNFORMAT does not prompt you for a specific file, that file is most likely intact. In certain circumstances, however, UNFORMAT may not recognize that a file is fragmented, even though it has located only a portion of the file. If this happens to a program file, the program does not run properly. If this happens to a data file, information is lost and the program that created the data file may not be able to read it. In these cases, your only recourse is to restore the files from your original floppy disks or backup files.


Sector size of the hard disk

The sectors on your hard disk must be 512, 1024, or 2048 bytes.


Examples

To determine whether UNFORMAT can restore a formatted disk in drive A, type:

    UNFORMAT A: /TEST

To restore a formatted disk in drive A, listing all files and subdirectories, type:

    UNFORMAT A: /L

Errorlevels

none.


Availability
External
DOS
v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02 v6.0 v6.10 v6.2 v6.21 v6.22 v6.23
Windows
none
Windows NT
none